System.ServiceModel.Description.WebHttpBehavior.ValidateBinding C# (CSharp) Метод

ValidateBinding() защищенный Метод

protected ValidateBinding ( ServiceEndpoint endpoint ) : void
endpoint ServiceEndpoint
Результат void
		protected virtual void ValidateBinding (ServiceEndpoint endpoint)
		{
			switch (endpoint.Binding.Scheme) {
			case "http":
			case "https":
				break;
			default:
				throw new InvalidOperationException ("Only http and https are allowed for WebHttpBehavior");
			}
			if (!endpoint.Binding.MessageVersion.Equals (MessageVersion.None))
				throw new InvalidOperationException ("Only MessageVersion.None is allowed for WebHttpBehavior");
			if (!endpoint.Binding.CreateBindingElements ().Find<TransportBindingElement> ().ManualAddressing)
				throw new InvalidOperationException ("ManualAddressing in the transport binding element in the binding must be true for WebHttpBehavior");
		}