public static List <TemplateData> Build(CodeGenerationParameters parameters, List <TemplateData> queriesData, List <ContentBase> contents) { var basePackage = parameters.RetrieveValue(Label.Package); var useCQRS = parameters.RetrieveValue(Label.Cqrs, x => bool.TrueString.ToLower() == x); return(parameters.RetrieveAll(Label.Aggregate).SelectMany(x => new List <TemplateData>() { new AutoDispatchMappingTemplateData(basePackage, x, useCQRS, contents), new AutoDispatchHandlersMappingTemplateData(basePackage, x, queriesData, contents, useCQRS) }).ToList()); }
public CodeGenerationContext On(CodeGenerationParameters parameters) { _parameters.AddAll(parameters); return(this); }
public CodeGenerationContext With(Label label, string value) { On(CodeGenerationParameters.From(label, value)); return(this); }
private CodeGenerationContext(FileStream filer, Type source) { _filer = filer; _source = source; _parameters = CodeGenerationParameters.From(Label.GenerationLocation, filer == null ? CodeGenerationLocationType.EXTERNAL.ToString() : CodeGenerationLocationType.INTERNAL.ToString()); }
public static CodeGenerationContext With(CodeGenerationParameters parameters) => new CodeGenerationContext().On(parameters);