public static string CollectedConditions(string className, List <string> conditionCategories) { var classDesc = new NoConstructorClassDescriptor( new List <string> { "System" }, new List <string> { "generated CollectedConditions by Automatine." }, "public", "partial", className, () => { var source = new CollectedConditionDefineDesc(className, conditionCategories); return(source.data); } ); return(classDesc.data); }
public static string AutoConditions(string className, string conditionName, List <string> comments, List <ValueAndCommentData> conditionAndComments) { var commentLines = new List <string> { conditionName, "generated AutoConditions by Automatine." }; commentLines.AddRange(comments); var classDesc = new NoConstructorClassDescriptor( new List <string>(), commentLines, "public", "partial", className, () => { var source = new AutoConditionsDesc(conditionName, conditionAndComments); return(source.data); } ); return(classDesc.data); }
public static string Changer(string changerName, List <string> routingComments, List <BranchData> brancheSourcesList, FinallyBranchData finallyBranch) { var classCommentBase = new List <string> { changerName, "generated Changer by Automatine." }; classCommentBase.AddRange(routingComments); var brancheSources = new List <ChangerBranchData>(); foreach (var branch in brancheSourcesList) { brancheSources.Add(new ChangerBranchData(branch)); } var classDesc = new NoConstructorClassDescriptor( new List <string> { "System", "Automatine" }, classCommentBase, "public", string.Empty, AutomatineDefinitions.Changer.CLASS_HEADER + changerName + " : " + AutomatineDefinitions.Changer.INTERFACE_NAME, () => { var source = new ChangerMethodDesc(changerName, brancheSources, finallyBranch); return(source.data); }, () => { var source = new ChangerShouldImplementMethodDesc(changerName, brancheSources, finallyBranch); return(source.data); } ); return(classDesc.data); }
public static string Routine(string className, string routineName, List <string> comments) { var commentLines = new List <string> { routineName, "generated Routine by Automatine." }; commentLines.AddRange(comments); var classDesc = new NoConstructorClassDescriptor( new List <string> { "System", "System.Collections", "Automatine" }, commentLines, "public", "partial", className, () => { var source = new RoutineMethodDesc(routineName); return(source.data); } ); return(classDesc.data); }