private void ApplyConfiguration(string configurationName) { NetPeerTcpBindingElement element2 = NetPeerTcpBindingCollectionElement.GetBindingCollectionElement().Bindings[configurationName]; this.resolverSettings = new PeerResolverSettings(); if (element2 == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigInvalidBindingConfigurationName", new object[] { configurationName, "netPeerTcpBinding" }))); } element2.ApplyConfiguration(this); this.transport.CreateDefaultResolver(this.Resolver); }
void ApplyConfiguration(string configurationName) { NetPeerTcpBindingCollectionElement section = NetPeerTcpBindingCollectionElement.GetBindingCollectionElement(); NetPeerTcpBindingElement element = section.Bindings[configurationName]; this.resolverSettings = new PeerResolverSettings(); if (element == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException( SR.GetString(SR.ConfigInvalidBindingConfigurationName, configurationName, ConfigurationStrings.NetPeerTcpBindingCollectionElementName))); } else { element.ApplyConfiguration(this); } this.transport.CreateDefaultResolver(this.Resolver); }