public CodeGenerationFileOptionsElement(string name, CodeGenerationFileType type, CodeGenerationFileStrategy strategy) { Filename = name; FileType = type; Strategy = strategy; }
public CodeGenerationFileStrategy GetStrategy(CodeGenerationFileType type) { return(Configuration.CodeGeneration.Files.FirstOrDefault(f => f.FileType == type)?.Strategy ?? CodeGenerationFileStrategy.SingleFile); }
public static CodeGenerationFileOptionsElement GetOutputOptions(this CodeGenerationElement @this, CodeGenerationFileType fileType) { var options = @this.Files.FirstOrDefault(f => f.FileType == fileType && !string.IsNullOrEmpty(f.Filename)); var path = GetOutputPath(@this); return(options ?? new CodeGenerationFileOptionsElement() { FileType = fileType, Filename = GetOutputFile(@this), Strategy = CodeGenerationFileStrategy.SingleFile }); }