File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
WebApiClientCore.Analyzers.SourceGenerator
WebApiClientCore.Extensions.SourceGenerator/Implementations Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,12 @@ public IEnumerable<string> Usings
5858 /// <summary>
5959 /// 类名
6060 /// </summary>
61- public string ClassName => "_" + this . httpApi . ToDisplayString ( SymbolDisplayFormat . MinimallyQualifiedFormat ) ;
61+ public string ClassName => this . httpApi . ToDisplayString ( SymbolDisplayFormat . MinimallyQualifiedFormat ) ;
6262
6363 /// <summary>
6464 /// 构造器名
6565 /// </summary>
66- public string CtorName => "_" + this . httpApi . Name ;
66+ public string CtorName => this . httpApi . Name ;
6767
6868 /// <summary>
6969 /// HttpApi代码构建器
@@ -98,13 +98,10 @@ public override string ToString()
9898 builder . AppendLine ( $ "namespace { this . Namespace } ") ;
9999 builder . AppendLine ( "{" ) ;
100100 builder . AppendLine ( $ "\t [HttpApiProxyClass(typeof({ this . HttpApiTypeName } ))]") ;
101- builder . AppendLine ( $ "\t class { this . ClassName } :{ this . BaseInterfaceName } ") ;
101+ builder . AppendLine ( $ "\t public class { this . ClassName } :{ this . BaseInterfaceName } ") ;
102102 builder . AppendLine ( "\t {" ) ;
103103
104- builder . AppendLine ( "\t \t [DebuggerBrowsable(DebuggerBrowsableState.Never)]" ) ;
105104 builder . AppendLine ( $ "\t \t private readonly IHttpApiInterceptor { this . apiInterceptorFieldName } ;") ;
106-
107- builder . AppendLine ( "\t \t [DebuggerBrowsable(DebuggerBrowsableState.Never)]" ) ;
108105 builder . AppendLine ( $ "\t \t private readonly ApiActionInvoker[] { this . actionInvokersFieldName } ;") ;
109106
110107 builder . AppendLine ( $ "\t \t public { this . CtorName } (IHttpApiInterceptor apiInterceptor,ApiActionInvoker[] actionInvokers)") ;
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ orderby methodAttr.Index
8585
8686 foreach ( var proxyType in interfaceType . Assembly . GetTypes ( ) )
8787 {
88- if ( proxyType . IsVisible || proxyType . IsClass == false )
88+ if ( proxyType . IsClass == false )
8989 {
9090 continue ;
9191 }
You can’t perform that action at this time.
0 commit comments