public CodeBlockSet(ICodeBlock pParent, string pPre) : base(pParent) { PreCodeLines.Add(new CodeLine(StringHelper.SpaceStrings(pPre, "set"))); PreCodeLines.Add(new CodeLine("{")); PostCodeLines.Add(new CodeLine("}")); }
public CodeBlockEnum(ICodeBlock pParent, string pPre, string pName) : base(pParent) { PreCodeLines.Add(new CodeLine(StringHelper.SpaceStrings(pPre, "enum", pName))); PreCodeLines.Add(new CodeLine("{")); PostCodeLines.Add(new CodeLine("}")); }
public CodeBlockNamespace(ICodeBlock pParent, string value) : base(pParent) { PreCodeLines.Add(new CodeLine("namespace " + (string.IsNullOrEmpty(value) ? "" : value))); PreCodeLines.Add(new CodeLine("{")); PostCodeLines.Add(new CodeLine("}")); this.TabCount = 0; }
public CodeBlockDoWhile(ICodeBlock pParent, string pCondition) : base(pParent) { PreCodeLines.Add(new CodeLine("do")); PreCodeLines.Add(new CodeLine("{")); PostCodeLines.Add(new CodeLine("}")); PostCodeLines.Add(new CodeLine("while (" + (string.IsNullOrEmpty(pCondition) ? "" : pCondition) + ")")); }
public CodeBlockFunction(ICodeBlock parent, string pre, string name, string parameters, string whereClause = null) : base(parent) { string functionSignature = StringHelper.SpaceStrings(pre, name, "(") + (string.IsNullOrEmpty(parameters) ? "" : parameters) + ")" + " " + whereClause; PreCodeLines.Add(new CodeLine(functionSignature)); PreCodeLines.Add(new CodeLine("{")); PostCodeLines.Add(new CodeLine("}")); }
public CodeBlockBlock(ICodeBlock pParent) : base(pParent) { PreCodeLines.Add(new CodeLine("{")); PostCodeLines.Add(new CodeLine("}")); }
public CodeBlockSwitch(ICodeBlock parent, string condition) : base(parent) { PreCodeLines.Add(new CodeLine("switch(" + condition + ")")); PreCodeLines.Add(new CodeLine("{")); PostCodeLines.Add(new CodeLine("}")); }
public CodeBlockDefault(ICodeBlock parent) : base(parent) { PreCodeLines.Add(new CodeLine("default:")); PostBodyCodeLines.Add(new CodeLine("break;")); }
public CodeBlockCaseNoBreak(ICodeBlock parent, string condition) : base(parent) { PreCodeLines.Add(new CodeLine(StringHelper.SpaceStrings("case ", condition) + ":")); }
public CodeBlockElseIf(ICodeBlock pParent, string pCondition) : base(pParent) { PreCodeLines.Add(new CodeLine("else if (" + (string.IsNullOrEmpty(pCondition) ? "" : pCondition) + ")")); PreCodeLines.Add(new CodeLine("{")); PostCodeLines.Add(new CodeLine("}")); }
public CodeBlockAutoProperty(ICodeBlock pParent, string pPre, string pName, string pGetPre, string pSetPre) : base(pParent) { PreCodeLines.Add(new CodeLine(StringHelper.SpaceStrings(pPre, pName, "{", pGetPre, "get;", pSetPre, "set;", "}"))); }
public CodeBlockAutoSet(ICodeBlock pParent) : base(pParent) { PreCodeLines.Add(new CodeLine("set;")); }
public CodeBlockInterface(ICodeBlock pParent, string pPre, string pName, string pPost) : base(pParent) { PreCodeLines.Add(new CodeLine(StringHelper.SpaceStrings(pPre, "interface", pName, pPost))); PreCodeLines.Add(new CodeLine("{")); PostCodeLines.Add(new CodeLine("}")); }
public CodeBlockFunction(ICodeBlock parent, string pre, string name, string parameters) : base(parent) { PreCodeLines.Add(new CodeLine(StringHelper.SpaceStrings(pre, name, "(") + (string.IsNullOrEmpty(parameters) ? "" : parameters) + ")")); PreCodeLines.Add(new CodeLine("{")); PostCodeLines.Add(new CodeLine("}")); }