internal static WSStreamedHttpBindingCollectionElement GetCollectionElement()
        {
            WSStreamedHttpBindingCollectionElement retVal = null;
            BindingsSection bindingsSection = (BindingsSection)ConfigurationManager.GetSection("system.serviceModel/bindings");

            if (null != bindingsSection)
            {
                retVal = bindingsSection[WSStreamedHttpBindingConstants.WSStreamedHttpBindingCollectionElementName] as WSStreamedHttpBindingCollectionElement;
            }

            return(retVal);
        }
Exemplo n.º 2
0
        void ApplyConfiguration(string configurationName)
        {
            WSStreamedHttpBindingCollectionElement    section = WSStreamedHttpBindingCollectionElement.GetCollectionElement();
            WSStreamedHttpBindingConfigurationElement element = section.Bindings[configurationName];

            if (element == null)
            {
                throw new ConfigurationErrorsException();
            }
            else
            {
                element.ApplyConfiguration(this);
            }
        }