private static string GetGeneratedScreenCode(ScreenSave screenSave) { ICodeBlock topBlock = new CodeBlockBaseNoIndent(null); string screenNamespace = CodeGeneratorCommonLogic.GetElementNamespace(screenSave); ICodeBlock codeBlock = topBlock.Namespace(screenNamespace); codeBlock = codeBlock.Class("public partial", screenSave.GetStrippedName(), " : RedGrin.INetworkArena"); GenerateRequestCreateEntity(codeBlock); GenerateRequestDestroy(codeBlock); return(topBlock.ToString()); }
private static string GenerateEmptyCustomScreenNetworkCode(ScreenSave screen) { ICodeBlock topBlock = new CodeBlockBaseNoIndent(null); string screenNamespace = CodeGeneratorCommonLogic.GetElementNamespace(screen); ICodeBlock codeBlock = topBlock.Namespace(screenNamespace); codeBlock = codeBlock.Class("public partial", screen.GetStrippedName()); codeBlock.Function("void", "CustomRequestCreateNetworkEntity", "ref RedGrin.INetworkEntity entity, object entityData") .Line(); codeBlock.Line(); codeBlock.Function("void", "CustomRequestDestroyNetworkEntity", "RedGrin.INetworkEntity entity") .Line(); return(topBlock.ToString()); }