File tree Expand file tree Collapse file tree
src/libraries/TedToolkit.RoslynHelper/Names Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ private protected virtual string GetSummaryName()
5050 . ToDisplayString ( SymbolDisplayFormat . FullyQualifiedFormat ) ) ;
5151 }
5252
53- private protected static string ToSummary ( string name )
53+ private static string ToSummary ( string name )
5454 {
5555 return name . Replace ( '<' , '{' ) . Replace ( '>' , '}' ) ;
5656 }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ internal MethodName(IMethodSymbol methodSymbol) : base(methodSymbol)
1717 }
1818
1919 /// <summary>
20- /// The singature of the method
20+ /// The signature of the method
2121 /// </summary>
2222 public MethodSignature Signature { get ; }
2323
@@ -47,14 +47,26 @@ private protected override string GetSummaryName()
4747 . Append ( base . GetSummaryName ( ) ) ;
4848 builder . Append ( '(' ) . Append ( string . Join ( "," , Parameters . Select ( p =>
4949 {
50- var type = ToSummary ( p . Type . FullName ) ;
51- return p . Symbol . RefKind switch
50+ var stringBuilder = new StringBuilder ( ) ;
51+ if ( p . Symbol . ScopedKind is not ScopedKind . None )
5252 {
53- RefKind . Ref => "ref " + type ,
54- RefKind . In => "in " + type ,
55- RefKind . Out => "out " + type ,
56- _ => type
57- } ;
53+ stringBuilder . Append ( "scoped " ) ;
54+ }
55+
56+ switch ( p . Symbol . RefKind )
57+ {
58+ case RefKind . Ref :
59+ stringBuilder . Append ( "ref " ) ;
60+ break ;
61+ case RefKind . Out :
62+ stringBuilder . Append ( "in " ) ;
63+ break ;
64+ case RefKind . In :
65+ stringBuilder . Append ( "out " ) ;
66+ break ;
67+ }
68+
69+ return stringBuilder . Append ( p . Type . SummaryName ) . ToString ( ) ;
5870 } ) ) ) . Append ( ')' ) ;
5971 return builder . ToString ( ) ;
6072 }
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public ParameterSyntax ParameterSyntax
3939 {
4040 var param = Parameter ( Identifier ( Name ) ) . WithType ( IdentifierName ( Type . FullName ) ) ;
4141
42- if ( Symbol . ScopedKind is ScopedKind . ScopedValue )
42+ if ( Symbol . ScopedKind is not ScopedKind . None )
4343 {
4444 param = param . AddModifiers ( Token ( SyntaxKind . ScopedKeyword ) ) ;
4545 }
You can’t perform that action at this time.
0 commit comments