示例#1
0
 public ToMethodGenerator(
     ParameterReWriter methodParametersReWriter,
     ClassReWriter classReWriter,
     IQuery <FileInfoDto, string> fileReader,
     IHandler <WriteFileInfoDto> fileWriter,
     IQuery <IEnumerable <Parameter>, ParameterListSyntax> getParametersQuery,
     IQuery <IEnumerable <IGenericInfo>, TypeParameterListSyntax> getGenericsQuery,
     IQuery <IEnumerable <IArgumentInfo>, BlockSyntax> getBlockStatementQuery)
 {
     _methodParametersReWriter = methodParametersReWriter;
     _classReWriter            = classReWriter;
     _fileReader             = fileReader;
     _fileWriter             = fileWriter;
     _getParametersQuery     = getParametersQuery;
     _getGenericsQuery       = getGenericsQuery;
     _getBlockStatementQuery = getBlockStatementQuery;
 }
 public GenerateManager()
 {
     GenerateInfoToMethods    = new GenerateInfoToMethods();
     FileReader               = new FileReader();
     ClassReWriter            = new ClassReWriter();
     MethodParametersReWriter = new ParameterReWriter();
     FileWriter               = new FileWriter();
     GetParameters            = new GetNodeStructure <Parameter, ParameterSyntax, ParameterListSyntax>(
         new GetParameterListSyntax(new ConcatSyntaxNodeOrToken <ParameterSyntax>()),
         new ParameterExpressionBuilder());
     GetGenerics = new GetNodeStructure <IGenericInfo, TypeParameterSyntax, TypeParameterListSyntax>(
         new GetTypeParameterListSyntax(new ConcatSyntaxNodeOrToken <TypeParameterSyntax>()),
         new GenericTypesBuilder());
     GetBlockStatement =
         new GetNodeStructure <IArgumentInfo, StatementSyntax, BlockSyntax>(new GetBlockStructure(),
                                                                            new StatementBuilder());
     ToMethodGenerator = new ToMethodGenerator(MethodParametersReWriter, ClassReWriter, FileReader, FileWriter,
                                               GetParameters, GetGenerics, GetBlockStatement);
 }