예제 #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);
         }
     }
 }
예제 #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);
        }
예제 #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);
        }
예제 #4
0
 public static DataHolderDefinition CreateDataHolderDefinition <T>() where T : IDataHolder
 {
     return(DataHolderMgr.CreateDataHolderDefinition(typeof(T)));
 }
예제 #5
0
 public static DataHolderDefinition[] CreateDataHolderDefinitionArray(Assembly asm)
 {
     return(DataHolderMgr.CreateDataHolderDefinitionList(asm).ToArray());
 }