Пример #1
0
        public BasicHttpsBinding(string configurationName)
            : this()
        {
            BindingsSection          bindingsSection = ConfigUtil.BindingsSection;
            BasicHttpsBindingElement el =
                bindingsSection.BasicHttpsBinding.Bindings [configurationName];

            el.ApplyConfiguration(this);
        }
Пример #2
0
        void ApplyConfiguration(string configurationName)
        {
            BasicHttpsBindingCollectionElement section = BasicHttpsBindingCollectionElement.GetBindingCollectionElement();
            BasicHttpsBindingElement           element = section.Bindings[configurationName];

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