Example #1
0
        private void ApplyConfiguration(string configurationName)
        {
            WS2007FederationHttpBindingElement element2 = WS2007FederationHttpBindingCollectionElement.GetBindingCollectionElement().Bindings[configurationName];

            if (element2 == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigInvalidBindingConfigurationName", new object[] { configurationName, "ws2007FederationHttpBinding" })));
            }
            element2.ApplyConfiguration(this);
        }
        void ApplyConfiguration(string configurationName)
        {
            WS2007FederationHttpBindingCollectionElement section = WS2007FederationHttpBindingCollectionElement.GetBindingCollectionElement();
            WS2007FederationHttpBindingElement           element = section.Bindings[configurationName];

            if (element == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(
                                                                              SR.GetString(SR.ConfigInvalidBindingConfigurationName,
                                                                                           configurationName,
                                                                                           ConfigurationStrings.WS2007FederationHttpBindingCollectionElementName)));
            }
            else
            {
                element.ApplyConfiguration(this);
            }
        }