Esempio n. 1
0
        static BaseConfigFactory()
        {
            lock (lockObject)
            {
                foreach (Type type in Assembly.GetCallingAssembly().GetTypes().Where(t => t.FullName.Contains("ConfigInfo")))
                {
                    if (typeof(IBaseConfigInfo).IsAssignableFrom(type))
                    {
                        if (type == typeof(IBaseConfigInfo))
                        {
                            continue;
                        }

                        IBaseConfigInfo baseConfig = (IBaseConfigInfo)Activator.CreateInstance(type);
                        if (configurationDic == null)
                        {
                            configurationDic = new Dictionary <string, BaseConfigInfo>();
                        }
                        if (baseConfig == null)
                        {
                            continue;
                        }

                        configurationDic.Add(baseConfig.ProviderName, new BaseConfigInfo(baseConfig));
                    }
                }
            }
        }
Esempio n. 2
0
 public BaseConfigInfo(IBaseConfigInfo baseConfigInfo)
 {
     instance = baseConfigInfo;
 }