System.ServiceModel.Configuration.EndpointCollectionElement.ContainsKey C# (CSharp) Method

ContainsKey() public abstract method

public abstract ContainsKey ( string name ) : bool
name string
return bool
		public abstract bool ContainsKey (string name);
		

Usage Example

Beispiel #1
0
 internal static void ValidateEndpointReference(string endpoint, string endpointConfiguration, ContextInformation evaluationContext, ConfigurationElement configurationElement)
 {
     if (evaluationContext == null)
     {
         DiagnosticUtility.FailFast("ValidateEndpointReference() should only called with valid ContextInformation");
     }
     if (!string.IsNullOrEmpty(endpoint))
     {
         EndpointCollectionElement element = null;
         if (evaluationContext != null)
         {
             element = ConfigurationHelpers.UnsafeGetAssociatedEndpointCollectionElement(evaluationContext, endpoint);
         }
         else
         {
             element = ConfigurationHelpers.UnsafeGetEndpointCollectionElement(endpoint);
         }
         if (element == null)
         {
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigInvalidSection", new object[] { ConfigurationHelpers.GetEndpointsSectionPath(endpoint) }), configurationElement.ElementInformation.Source, configurationElement.ElementInformation.LineNumber));
         }
         if (!string.IsNullOrEmpty(endpointConfiguration) && !element.ContainsKey(endpointConfiguration))
         {
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigInvalidEndpointName", new object[] { endpointConfiguration, ConfigurationHelpers.GetEndpointsSectionPath(endpoint), "endpointConfiguration" }), configurationElement.ElementInformation.Source, configurationElement.ElementInformation.LineNumber));
         }
     }
 }
All Usage Examples Of System.ServiceModel.Configuration.EndpointCollectionElement::ContainsKey