protected internal virtual void InitializeFrom(ServiceEndpoint endpoint) { if (endpoint == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpoint"); } if (endpoint.GetType() != this.EndpointType) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(System.ServiceModel.SR.GetString("ConfigInvalidTypeForEndpoint", new object[] { (this.EndpointType == null) ? string.Empty : this.EndpointType.AssemblyQualifiedName, endpoint.GetType().AssemblyQualifiedName })); } }
public void ApplyConfiguration(ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement) { if (endpoint == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpoint"); } if (serviceEndpointElement == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("serviceEndpointElement"); } if (endpoint.GetType() != this.EndpointType) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(System.ServiceModel.SR.GetString("ConfigInvalidTypeForEndpoint", new object[] { (this.EndpointType == null) ? string.Empty : this.EndpointType.AssemblyQualifiedName, endpoint.GetType().AssemblyQualifiedName })); } this.OnApplyConfiguration(endpoint, serviceEndpointElement); }
public void ApplyConfiguration(ServiceEndpoint endpoint, ChannelEndpointElement channelEndpointElement) { if (null == endpoint) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpoint"); } if (null == channelEndpointElement) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("channelEndpointElement"); } if (endpoint.GetType() != this.EndpointType) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(SR.GetString(SR.ConfigInvalidTypeForEndpoint, this.EndpointType.AssemblyQualifiedName, endpoint.GetType().AssemblyQualifiedName)); } // The properties endpoint.Name and this.Name are actually two different things: // - endpoint.Name corresponds to the service endpoint name and is surfaced through // serviceEndpointElement.Name // - this.Name is a token used as a key in the endpoint collection to identify // a specific bucket of configuration settings. // Thus, the Name property is skipped here. this.OnApplyConfiguration(endpoint, channelEndpointElement); }
protected internal virtual void InitializeFrom (ServiceEndpoint endpoint) { if (endpoint == null) throw new ArgumentNullException ("endpoint"); if (!EndpointType.IsAssignableFrom (endpoint.GetType ())) throw new ArgumentNullException (String.Format ("Argument endpoint type is not of expected type '{0}'", EndpointType)); // not sure if that's all, but that's what is documented. }