File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
projects/client/Apigen/src/apigen Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -858,16 +858,13 @@ public void MaybeEmitModelMethod(MethodInfo method) {
858
858
}
859
859
860
860
public string SanitisedFullName ( Type t ) {
861
- CodeTypeReference typeReference = new CodeTypeReference ( t ) ;
862
- CodeVariableDeclarationStatement variableDeclaration = new CodeVariableDeclarationStatement ( typeReference , "dummy" ) ;
861
+ CodeTypeReferenceExpression tre = new CodeTypeReferenceExpression ( t . FullName ) ;
863
862
StringBuilder sb = new StringBuilder ( ) ;
864
863
using ( StringWriter writer = new StringWriter ( sb ) )
865
864
{
866
- this . m_csharpProvider . GenerateCodeFromStatement ( variableDeclaration , writer , new CodeGeneratorOptions ( ) ) ;
865
+ this . m_csharpProvider . GenerateCodeFromExpression ( tre , writer , new CodeGeneratorOptions ( ) ) ;
867
866
}
868
867
869
- sb . Replace ( " dummy;" , null ) ;
870
-
871
868
return sb . ToString ( ) . Trim ( ' ' , '\t ' , '\r ' , '\n ' ) ;
872
869
}
873
870
You can’t perform that action at this time.
0 commit comments