Example #1
0
 public static void CreateAndStoreDataHolderDefinitions(Assembly asm)
 {
     foreach (Type type in asm.GetTypes())
     {
         if (((IEnumerable <DataHolderAttribute>)type.GetCustomAttributes <DataHolderAttribute>())
             .Count <DataHolderAttribute>() > 0)
         {
             DataHolderDefinition holderDefinition = DataHolderMgr.CreateDataHolderDefinition(type);
             DataHolderMgr.DataHolderDefinitions.Add(holderDefinition.Name, holderDefinition);
         }
     }
 }
Example #2
0
        public static Dictionary <string, DataHolderDefinition> CreateDataHolderDefinitionMap(Assembly asm)
        {
            Dictionary <string, DataHolderDefinition> dictionary = new Dictionary <string, DataHolderDefinition>();

            foreach (Type type in asm.GetTypes())
            {
                if (((IEnumerable <DataHolderAttribute>)type.GetCustomAttributes <DataHolderAttribute>())
                    .Count <DataHolderAttribute>() > 0)
                {
                    DataHolderDefinition holderDefinition = DataHolderMgr.CreateDataHolderDefinition(type);
                    dictionary.Add(holderDefinition.Name, holderDefinition);
                }
            }

            return(dictionary);
        }
Example #3
0
        public static List <DataHolderDefinition> CreateDataHolderDefinitionList(Assembly asm)
        {
            List <DataHolderDefinition> holderDefinitionList = new List <DataHolderDefinition>();

            foreach (Type type in asm.GetTypes())
            {
                if (type.Name == "PetLevelStatInfo")
                {
                    type.ToString();
                }
                if (((IEnumerable <DataHolderAttribute>)type.GetCustomAttributes <DataHolderAttribute>())
                    .Count <DataHolderAttribute>() > 0)
                {
                    DataHolderDefinition holderDefinition = DataHolderMgr.CreateDataHolderDefinition(type);
                    holderDefinitionList.Add(holderDefinition);
                }
            }

            return(holderDefinitionList);
        }
Example #4
0
 public static DataHolderDefinition CreateDataHolderDefinition <T>() where T : IDataHolder
 {
     return(DataHolderMgr.CreateDataHolderDefinition(typeof(T)));
 }
Example #5
0
 public static DataHolderDefinition[] CreateDataHolderDefinitionArray(Assembly asm)
 {
     return(DataHolderMgr.CreateDataHolderDefinitionList(asm).ToArray());
 }