public TokenDictionary Format() { var tokenDictionary = HasBaseClass ? new TokenDictionary(BaseClass.Format()) : new TokenDictionary(); string name, @namespace; if (GuerillaCs.SplitNamespaceFromFieldName(_value.Name, out name, out @namespace)) { Name = tokenDictionary.GenerateValidToken(GuerillaCs.ToTypeName(name)); Namespace = new NamespaceInfo(GuerillaCs.ToTypeName(@namespace)); } else { Name = tokenDictionary.GenerateValidToken(GuerillaCs.ToTypeName(_value.Name)); } FormatFieldNames(tokenDictionary); foreach (var item in EnumDefinitions) { item.Format(); } foreach (var item in ClassDefinitions) { item.Format(); } return(tokenDictionary); }
public ClassInfo() { Usings = new List <string> { "// ReSharper disable All", new UsingInfo("Moonfish.Model"), new UsingInfo("Moonfish.Tags.BlamExtension"), new UsingInfo("Moonfish.Tags"), new UsingInfo("OpenTK"), new UsingInfo("System"), new UsingInfo("System.IO"), new UsingInfo("System.Collections.Generic"), new UsingInfo("System.Linq") }; Attributes = new List <AttributeInfo>(); Fields = new List <FieldInfo>(); Properties = new List <PropertyInfo>(); Constructors = new List <MethodInfo>(); EnumDefinitions = new List <EnumInfo>(); ClassDefinitions = new List <ClassInfo>(); Methods = new List <MethodInfo>(); MethodTemplates = new List <MethodInfo>(); _value = new GuerillaName(""); Name = ""; Namespace = new NamespaceInfo(); }