System.Configuration.BaseConfigurationRecord.ValidateUniqueConfigSource C# (CSharp) Метод

ValidateUniqueConfigSource() приватный Метод

private ValidateUniqueConfigSource ( string configKey, string configSourceStreamName, string configSourceArg, IConfigErrorInfo errorInfo ) : void
configKey string
configSourceStreamName string
configSourceArg string
errorInfo IConfigErrorInfo
Результат void
        private void ValidateUniqueConfigSource(
                string configKey, string configSourceStreamName, string configSourceArg, IConfigErrorInfo errorInfo) {

            //
            // Detect if another section in this file is using the same configSource 
            // with has a different section name.
            //
            lock (this) {
                if (ConfigStreamInfo.HasStreamInfos) {
                    StreamInfo streamInfo = (StreamInfo) ConfigStreamInfo.StreamInfos[configSourceStreamName];
                    if (streamInfo != null && streamInfo.SectionName != configKey) {
                        throw new ConfigurationErrorsException(
                            SR.GetString(SR.Config_source_cannot_be_shared, configSourceArg),
                            errorInfo);
                    }
                }
            }
            
            ValidateUniqueChildConfigSource(configKey, configSourceStreamName, configSourceArg, errorInfo);
        }
            
BaseConfigurationRecord