Beispiel #1
0
 protected Gom()
 {
     definitions       = new Dictionary <ulong, HeroDefinition>();
     DefinitionsByName = new Dictionary <HeroDefinition.Types, Dictionary <string, HeroDefinition> >();
     DefinitionsByName[HeroDefinition.Types.Association] = new Dictionary <string, HeroDefinition>();
     DefinitionsByName[HeroDefinition.Types.Class]       = new Dictionary <string, HeroDefinition>();
     DefinitionsByName[HeroDefinition.Types.Enumeration] = new Dictionary <string, HeroDefinition>();
     DefinitionsByName[HeroDefinition.Types.Field]       = new Dictionary <string, HeroDefinition>();
     DefinitionsByName[HeroDefinition.Types.Node]        = new Dictionary <string, HeroDefinition>();
     DefinitionsByName[HeroDefinition.Types.Script]      = new Dictionary <string, HeroDefinition>();
     Spaces = new Dictionary <IDSpaces, IDSpace>();
     Spaces[IDSpaces.ServerTemporaryNode] = new IDSpace(2000000000UL, 4000000000UL);
     Root = new GOMFolder();
 }
Beispiel #2
0
        protected void AddNode(HeroNodeDef node)
        {
            string[] strArray = node.Name.Split(new char[1]
            {
                '.'
            });
            if (strArray.Length <= 0)
            {
                return;
            }
            GOMFolder gomFolder = Root;

            foreach (string name in strArray)
            {
                gomFolder = gomFolder.CreateFolder(name);
            }
            gomFolder.SetNode(node);
        }