Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Commit

Permalink
extractor: update type identifier structure
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzz465 committed Oct 13, 2022
1 parent 61f68cf commit aaa2b68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
20 changes: 2 additions & 18 deletions extractor/extractor/NameUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,12 @@ public static class NameUtility

public static string GetTypeIdentifier(Type T, bool checkGenericType = true)
{
if (T.IsGenericType && checkGenericType)
{
var genericName = GetTypeIdentifier(T, false);
var arguments = from genArg in T.GetGenericArguments()
select GetTypeIdentifier(genArg);

return $"{genericName}<{String.Join(", ", arguments)}>";
}

if (String.IsNullOrEmpty(T.Namespace))
{
return T.Name;
}
else
{
return String.Join(".", T.Namespace, T.Name);
}
return T.FullName;
}

public static string GetTypeClassName(Type T)
{
return T.Name;
return T.FullName.Replace(GetTypeNamespaceName(T) + ".", "");
}

public static string GetTypeNamespaceName(Type T)
Expand Down
2 changes: 1 addition & 1 deletion vsc-extension/src/resources/cachedTypeInfoProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class CachedTypeInfoProvider implements Provider {
})

// TODO: move this line to extractor.
private static readonly extractorVersion = new semver.SemVer('0.8.0')
private static readonly extractorVersion = new semver.SemVer('0.9.0')

get dllCacheDirectory(): string {
return path.join(this.pathStore.cacheDirectory, 'dlls')
Expand Down

0 comments on commit aaa2b68

Please sign in to comment.