@@ -8,9 +8,7 @@ namespace AsyncTaskOrchestratorGenerator
88{
99 internal static class OutputGenerator
1010 {
11- public static ( string source , string className ) GenerateClassOutputs ( ( INamedTypeSymbol typeSymbol , SemanticModel semanticModel ) typeInfo ) {
12- var type = typeInfo . typeSymbol ;
13- var semanticModel = typeInfo . semanticModel ;
11+ public static ( string source , string className ) GenerateClassOutputs ( INamedTypeSymbol type ) {
1412 var constructorArguments = GetAttributeConstructorArguments ( type ) ;
1513 var className = constructorArguments . First ( ) . Value . ToString ( ) ;
1614 var executeMethodName = constructorArguments . ElementAt ( 1 ) . Value . ToString ( ) ;
@@ -50,10 +48,6 @@ namespace {type.ContainingNamespace.ToDisplayString()};
5048 return ( source , className ) ;
5149 }
5250
53- private static System . Collections . Immutable . ImmutableArray < TypedConstant > GetAttributeConstructorArguments ( INamedTypeSymbol type ) {
54- return type . GetAttributes ( ) . First ( ( a ) => a . AttributeClass . Name == nameof ( AsyncTaskOrchestratorAttribute ) ) . ConstructorArguments ;
55- }
56-
5751 public static ( string source , string interfaceName ) GenerateInterfaceOutputs ( INamedTypeSymbol type ) {
5852 var constructorArguments = GetAttributeConstructorArguments ( type ) ;
5953 var className = constructorArguments . First ( ) . Value . ToString ( ) ;
@@ -79,6 +73,10 @@ namespace {type.ContainingNamespace.ToDisplayString()};
7973 return ( source , interfaceName ) ;
8074 }
8175
76+ private static System . Collections . Immutable . ImmutableArray < TypedConstant > GetAttributeConstructorArguments ( INamedTypeSymbol type ) {
77+ return type . GetAttributes ( ) . First ( ( a ) => a . AttributeClass . Name == nameof ( AsyncTaskOrchestratorAttribute ) ) . ConstructorArguments ;
78+ }
79+
8280 private static ( ExecuteMethodSignatureData , Dictionary < string , TaskData > , TaskData ) CreateExecuteMethodData ( INamedTypeSymbol type , IEnumerable < IFieldSymbol > fields , string executeMethodName ) {
8381 var executeMethod = GetExecuteMethod ( type ) ;
8482 var statements = ( executeMethod . DeclaringSyntaxReferences . First ( ) . GetSyntax ( ) as MethodDeclarationSyntax ) . Body . Statements ;
0 commit comments