Example #1
0
 public StuntCodeAction(string title, Document document, Diagnostic diagnostic, NamingConvention naming)
 {
     this.title      = title;
     this.document   = document;
     this.diagnostic = diagnostic;
     this.naming     = naming;
 }
Example #2
0
 /// <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()));
 }
Example #3
0
 /// <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())
 {
 }
Example #4
0
 protected virtual StuntGenerator CreateGenerator(NamingConvention naming) => new StuntGenerator(naming);
Example #5
0
 /// <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;
 }
Example #6
0
 /// <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;
 }
Example #7
0
 /// <summary>
 /// Initializes the action.
 /// </summary>
 public StuntCodeAction(Document document, Diagnostic diagnostic, NamingConvention naming)
     : this(Resources.StuntCodeAction_Title, document, diagnostic, naming)
 {
 }