public BasicHttpContextBinding(string configName) { this.contextManagementEnabled = true; if (configName == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("configName"); } BasicHttpContextBindingElement element2 = BasicHttpContextBindingCollectionElement.GetBindingCollectionElement().Bindings[configName]; element2.ApplyConfiguration(this); if (element2.ElementInformation.Properties["allowCookies"].ValueOrigin == PropertyValueOrigin.Default) { base.AllowCookies = true; } else if (!base.AllowCookies) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(System.ServiceModel.SR.GetString("BasicHttpContextBindingRequiresAllowCookie", new object[] { base.Namespace, base.Name })); } }
public BasicHttpContextBinding(string configName) : base() { if (configName == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("configName"); } BasicHttpContextBindingCollectionElement section = BasicHttpContextBindingCollectionElement.GetBindingCollectionElement(); BasicHttpContextBindingElement element = section.Bindings[configName]; element.ApplyConfiguration(this); if (element.ElementInformation.Properties["allowCookies"].ValueOrigin == PropertyValueOrigin.Default) { this.AllowCookies = true; } else if (!this.AllowCookies) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(SR.GetString(SR.BasicHttpContextBindingRequiresAllowCookie, this.Namespace, this.Name)); } }