Beispiel #1
0
        private static void ThrowWhenProviderIsInChain(LoggingProviderBase providerToValidate,
                                                       LoggingProviderChain providersInChain)
        {
            // Check whether the supplied provider is already directly or indirectly referencing itself.
            bool providerIsSelfReferenced = providersInChain.Contains(providerToValidate);

            if (providerIsSelfReferenced)
            {
                throw new ConfigurationErrorsException(
                          SR.CircularReferenceInLoggingSection(Logger.SectionName, providerToValidate.Name));
            }
        }