예제 #1
0
        string BuildContent(OutputParam outputParam)
        {
            var contents = new StringBuilder(template.Format);

            contents = contents.Replace(template.NamespaceParam.Key, template.NamespaceParam.Value);
            contents = contents.Replace(TemplateKey.Class, outputParam.ClassName);
            contents = contents.Replace(template.SuperClassNameParam.Key, template.SuperClassNameParam.Value);

            foreach (var param in template.ParamList.Where(param => param.IsValid()))
            {
                contents = contents.Replace(param.Key, param.Value);
            }

            return(contents.ToString());
        }
예제 #2
0
 string BuildFilePath(OutputParam outputParam)
 {
     return($"{template.OutputPath}/{outputParam.FileName}.cs");
 }