public static IGBody AddBody(this IGBody gBody, IEnumerable <IGBody> gBodys) { foreach (var o in gBodys) { gBody.GStatements.AddRange(o.GStatements); } return(gBody); }
public GItemGroupInProjectUnit(string gName = "", string gDescription = "", IGBody gBody = default, IGComment gComment = default) { GName = gName ?? throw new ArgumentNullException(nameof(gName)); GDescription = gDescription == default ? "" : gDescription; GBody = gBody == default ? new GBody() : gBody; GComment = gComment == default ? new GComment() : gComment; Id = new GItemGroupInProjectUnitId <TValue>(); }
public static IR1Top RBody(this IR1Top r1Top, IGBody gBody) { r1Top.RComment(gBody.GComment); foreach (var s in gBody.GStatements) { r1Top.Sb.RenderBodyStatementStringBuilder(s, r1Top.Indent, r1Top.Eol, r1Top.Ct); } return(r1Top); }
public GMethod(IGMethodDeclaration gDeclaration = default, IGBody gBody = default, IGComment gComment = default, bool isForInterface = false, IGStateConfiguration gStateConfiguration = default) { GDeclaration = gDeclaration == default ? new GMethodDeclaration() : gDeclaration; GBody = gBody == default ? new GBody() : gBody; GComment = gComment == default ? new GComment() : gComment; IsForInterface = isForInterface; GStateConfiguration = gStateConfiguration == default ? new GStateConfiguration() : gStateConfiguration; Id = new GMethodId <TValue>(); }
public GStaticVariable(string gName = default, string gType = default, string gVisibility = default, string gAccessModifier = default, IGBody gBody = default, IList <string> gAdditionalStatements = default, IGComment gComment = default) { GName = gName == default ? "" : gName; GVisibility = gVisibility == default ? "" : gVisibility; GType = gType == default ? "" : gType; GAccessModifier = gAccessModifier == default ? "" : gAccessModifier; GBody = gBody == default ? new GBody() : gBody; GAdditionalStatements = gAdditionalStatements == default ? new List <string>() : gAdditionalStatements; GComment = gComment == default ? new GComment() : gComment; Id = new GStaticVariableId <TValue>(); }
public static IGBody AddBody(this IGBody gBody, IGBody gAdditionalBody) { gBody.GStatements.AddRange(gAdditionalBody.GStatements); return(gBody); }