private static string GenerateEmptyCustomNetStateCode(EntitySave entitySave) { ICodeBlock topBlock = new CodeBlockBaseNoIndent(null); string netStateNamespace = CodeGeneratorCommonLogic.GetNetStateNamespace(entitySave); ICodeBlock codeBlock = topBlock.Namespace(netStateNamespace); codeBlock = codeBlock.Class("public partial", entitySave.GetStrippedName() + "NetState"); return(topBlock.ToString()); }
private static string GenerateNetStateGeneratedCode(EntitySave entitySave) { ICodeBlock topBlock = new CodeBlockBaseNoIndent(null); string netStateNamespace = CodeGeneratorCommonLogic.GetNetStateNamespace(entitySave); ICodeBlock codeBlock = topBlock.Namespace(netStateNamespace); codeBlock = codeBlock.Class("public partial", entitySave.GetStrippedName() + "NetState"); var variables = GetNetworkVariables(entitySave); foreach (var variable in variables) { codeBlock.AutoProperty($"public {variable.Type}", variable.Name); } return(topBlock.ToString()); }