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