public MultipleStatementsCodeGenerator(
     InsertionPoint insertionPoint,
     SelectionResult selectionResult,
     AnalyzerResult analyzerResult) :
     base(insertionPoint, selectionResult, analyzerResult)
 {
 }
 public ExpressionCodeGenerator(
     InsertionPoint insertionPoint,
     SelectionResult selectionResult,
     AnalyzerResult analyzerResult) :
     base(insertionPoint, selectionResult, analyzerResult)
 {
 }
            protected CodeGenerator(
                InsertionPoint insertionPoint,
                SelectionResult selectionResult,
                AnalyzerResult analyzerResult,
                OptionSet options  = null,
                bool localFunction = false
                )
            {
                Contract.ThrowIfFalse(
                    insertionPoint.SemanticDocument == analyzerResult.SemanticDocument
                    );

                InsertionPoint   = insertionPoint;
                SemanticDocument = insertionPoint.SemanticDocument;

                SelectionResult = selectionResult;
                AnalyzerResult  = analyzerResult;

                Options       = options;
                LocalFunction = localFunction;

                MethodNameAnnotation       = new SyntaxAnnotation();
                CallSiteAnnotation         = new SyntaxAnnotation();
                MethodDefinitionAnnotation = new SyntaxAnnotation();
            }
Example #4
0
 protected abstract Task <GeneratedCode> GenerateCodeAsync(
     InsertionPoint insertionPoint,
     SelectionResult selectionResult,
     AnalyzerResult analyzeResult,
     OptionSet options,
     CancellationToken cancellationToken
     );
            protected CodeGenerator(InsertionPoint insertionPoint, SelectionResult selectionResult, AnalyzerResult analyzerResult)
            {
                Contract.ThrowIfFalse(insertionPoint.SemanticDocument == analyzerResult.SemanticDocument);

                this.InsertionPoint   = insertionPoint;
                this.SemanticDocument = insertionPoint.SemanticDocument;

                this.SelectionResult = selectionResult;
                this.AnalyzerResult  = analyzerResult;

                this.MethodNameAnnotation       = new SyntaxAnnotation();
                this.CallSiteAnnotation         = new SyntaxAnnotation();
                this.MethodDefinitionAnnotation = new SyntaxAnnotation();
            }
            protected CodeGenerator(InsertionPoint insertionPoint, SelectionResult selectionResult, AnalyzerResult analyzerResult, TCodeGenerationOptions options, NamingStylePreferencesProvider namingPreferences, bool localFunction)
            {
                Contract.ThrowIfFalse(insertionPoint.SemanticDocument == analyzerResult.SemanticDocument);

                InsertionPoint   = insertionPoint;
                SemanticDocument = insertionPoint.SemanticDocument;

                SelectionResult = selectionResult;
                AnalyzerResult  = analyzerResult;

                Options           = options;
                NamingPreferences = namingPreferences;
                LocalFunction     = localFunction;

                MethodNameAnnotation       = new SyntaxAnnotation();
                CallSiteAnnotation         = new SyntaxAnnotation();
                MethodDefinitionAnnotation = new SyntaxAnnotation();
            }
Example #7
0
 protected override Task<MethodExtractor.GeneratedCode> GenerateCodeAsync(InsertionPoint insertionPoint, SelectionResult selectionResult, AnalyzerResult analyzeResult, CancellationToken cancellationToken)
 {
     return CSharpCodeGenerator.GenerateAsync(insertionPoint, selectionResult, analyzeResult, cancellationToken);
 }
Example #8
0
 protected abstract Task<GeneratedCode> GenerateCodeAsync(InsertionPoint insertionPoint, SelectionResult selectionResult, AnalyzerResult analyzeResult, CancellationToken cancellationToken);
Example #9
0
 protected abstract Task <GeneratedCode> GenerateCodeAsync(InsertionPoint insertionPoint, SelectionResult selectionResult, AnalyzerResult analyzeResult, CodeGenerationOptions options, NamingStylePreferencesProvider namingPreferences, CancellationToken cancellationToken);