File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ internal class DotNetCoreAssemblyResolver : IAssemblyResolver
1212 {
1313 private readonly DefaultAssemblyResolver _defaultAssemblyResolver ;
1414 private readonly Dictionary < string , AssemblyDefinition > _libraries ;
15- public string AssemblyPath = "" ;
15+ public string AssemblyPath { get ; set ; } = "" ;
1616
1717 public DotNetCoreAssemblyResolver ( )
1818 {
Original file line number Diff line number Diff line change @@ -16,22 +16,22 @@ public struct FilterResult
1616 /// <summary>
1717 /// Load this assembly and traverse its dependencies
1818 /// </summary>
19- public static FilterResult LoadAndContinue = new FilterResult ( true , true ) ;
19+ public static readonly FilterResult LoadAndContinue = new FilterResult ( true , true ) ;
2020
2121 /// <summary>
2222 /// Do not load this assembly, but traverse its dependencies
2323 /// </summary>
24- public static FilterResult SkipAndContinue = new FilterResult ( true , false ) ;
24+ public static readonly FilterResult SkipAndContinue = new FilterResult ( true , false ) ;
2525
2626 /// <summary>
2727 /// Load this assembly and do not traverse its dependencies
2828 /// </summary>
29- public static FilterResult LoadAndStop = new FilterResult ( false , true ) ;
29+ public static readonly FilterResult LoadAndStop = new FilterResult ( false , true ) ;
3030
3131 /// <summary>
3232 /// Do not load this assembly and do not traverse its dependencies
3333 /// </summary>
34- public static FilterResult DontLoadAndStop = new FilterResult ( false , false ) ;
34+ public static readonly FilterResult DontLoadAndStop = new FilterResult ( false , false ) ;
3535
3636 private FilterResult ( bool traverseDependencies , bool loadThisAssembly )
3737 {
Original file line number Diff line number Diff line change @@ -30,11 +30,18 @@ internal static class MonoCecilMemberExtensions
3030
3131 internal static string BuildFullName ( this MethodReference methodReference )
3232 {
33- return methodReference . FullName
34- + methodReference . GenericParameters . Aggregate (
35- string . Empty ,
36- ( current , newElement ) => current + "<" + newElement . Name + ">"
37- ) ;
33+ if ( ! methodReference . HasGenericParameters )
34+ {
35+ return methodReference . FullName ;
36+ }
37+
38+ var sb = new StringBuilder ( methodReference . FullName ) ;
39+ foreach ( var p in methodReference . GenericParameters )
40+ {
41+ sb . Append ( '<' ) . Append ( p . Name ) . Append ( '>' ) ;
42+ }
43+
44+ return sb . ToString ( ) ;
3845 }
3946
4047 [ NotNull ]
You can’t perform that action at this time.
0 commit comments