File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,12 @@ public static string Format(Type type)
1717 return type . Name ;
1818 }
1919
20- return $ "{ type . Name . Substring ( 0 , type . Name . Length - GenericSuffixLength ) } <{ Format ( args [ 0 ] ) } >";
20+ #if NET6_0_OR_GREATER
21+ var nameNoAirity = type . Name [ ..( type . Name . Length - GenericSuffixLength ) ] ;
22+ #else
23+ var nameNoAirity = type . Name . Substring ( 0 , type . Name . Length - GenericSuffixLength ) ;
24+ #endif
25+
26+ return $ "{ nameNoAirity } <{ Format ( args [ 0 ] ) } >";
2127 }
2228}
Original file line number Diff line number Diff line change @@ -6,5 +6,9 @@ internal static class KeyHelper
66 private const int GuidPartLength = 8 ;
77
88 public static string GuidPart ( ) =>
9+ #if NET6_0_OR_GREATER
10+ Guid . NewGuid ( ) . ToString ( ) [ ..GuidPartLength ] ;
11+ #else
912 Guid . NewGuid ( ) . ToString ( ) . Substring ( 0 , GuidPartLength ) ;
13+ #endif
1014}
You can’t perform that action at this time.
0 commit comments