public StuntCodeAction(string title, Document document, Diagnostic diagnostic, NamingConvention naming) { this.title = title; this.document = document; this.diagnostic = diagnostic; this.naming = naming; }
/// <summary> /// Initializes the generator with a custom <see cref="NamingConvention"/> and /// the given set of <see cref="IDocumentProcessor"/>s. /// </summary> public StuntGenerator(NamingConvention naming, IEnumerable <IDocumentProcessor> processors) { this.naming = naming; // Splits the processors by supported language and then by phase. this.processors = processors .SelectMany(processor => processor.Languages.Select(lang => new { Processor = processor, Language = lang })) .GroupBy(proclang => proclang.Language) .ToDictionary( bylang => bylang.Key, bylang => bylang .GroupBy(proclang => proclang.Processor.Phase) .ToDictionary( byphase => byphase.Key, byphase => byphase.Select(proclang => proclang.Processor).ToArray())); }
/// <summary> /// Initializes the generator with a custom <see cref="NamingConvention"/> and /// the <see cref="GetDefaultProcessors"/> default processors. /// </summary> public StuntGenerator(NamingConvention naming) : this(naming, GetDefaultProcessors()) { }
protected virtual StuntGenerator CreateGenerator(NamingConvention naming) => new StuntGenerator(naming);
/// <summary> /// Customizes the analyzer by specifying a custom <see cref="NamingConvention"/> and /// <see cref="generatorAttribute"/> to lookup in method invocations. /// </summary> protected StuntGeneratorAnalyzer(NamingConvention naming, Type generatorAttribute, bool recursive = false) { this.naming = naming; this.generatorAttribute = generatorAttribute; this.recursive = recursive; }
/// <summary> /// Customizes the analyzer by specifying a custom <see cref="NamingConvention"/> and /// <see cref="generatorAttribute"/> to lookup in method invocations. /// </summary> protected UnsupportedNestedTypeAnalyzer(NamingConvention naming, Type generatorAttribute) { this.naming = naming; this.generatorAttribute = generatorAttribute; }
/// <summary> /// Initializes the action. /// </summary> public StuntCodeAction(Document document, Diagnostic diagnostic, NamingConvention naming) : this(Resources.StuntCodeAction_Title, document, diagnostic, naming) { }