예제 #1
0
        private static void CheckConfigProvider(ConfigSetting setting, ref bool sourceDone)
        {
            var configProvider = setting.ConfigProvider;

            if (!string.IsNullOrEmpty(configProvider))
            {
                var providerType = TypeHelper.CreateType(configProvider, false);
                if (providerType != null)
                {
                    if (TypeHelper.TryInvoke(providerType, "GetConfigSetting", out var returnValue, false, setting.ConfigSource))
                    {
                        if (returnValue is ConfigSetting configSetting)
                        {
                            setting.Merge(configSetting);
                            sourceDone = true;
                        }
                    }
                }
            }
        }