public OptionalReliableSession(System.ServiceModel.Channels.ReliableSessionBindingElement reliableSessionBindingElement)
 {
 }
Beispiel #2
0
 private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
 {
     if ((endpointConfiguration == EndpointConfiguration.NetHttpOrdered_WSReliableMessaging11_IWcfReliableService))
     {
         System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
         System.ServiceModel.Channels.ReliableSessionBindingElement reliableBindingElement = new System.ServiceModel.Channels.ReliableSessionBindingElement();
         reliableBindingElement.ReliableMessagingVersion = System.ServiceModel.ReliableMessagingVersion.WSReliableMessaging11;
         result.Elements.Add(reliableBindingElement);
         result.Elements.Add(new System.ServiceModel.Channels.BinaryMessageEncodingBindingElement());
         System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
         httpBindingElement.AllowCookies           = true;
         httpBindingElement.MaxBufferSize          = int.MaxValue;
         httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
         result.Elements.Add(httpBindingElement);
         return(result);
     }
     if ((endpointConfiguration == EndpointConfiguration.NetHttpUnordered_WSReliableMessaging11_IWcfReliableService))
     {
         System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
         System.ServiceModel.Channels.ReliableSessionBindingElement reliableBindingElement = new System.ServiceModel.Channels.ReliableSessionBindingElement();
         reliableBindingElement.Ordered = false;
         reliableBindingElement.ReliableMessagingVersion = System.ServiceModel.ReliableMessagingVersion.WSReliableMessaging11;
         result.Elements.Add(reliableBindingElement);
         result.Elements.Add(new System.ServiceModel.Channels.BinaryMessageEncodingBindingElement());
         System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
         httpBindingElement.AllowCookies           = true;
         httpBindingElement.MaxBufferSize          = int.MaxValue;
         httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
         result.Elements.Add(httpBindingElement);
         return(result);
     }
     if ((endpointConfiguration == EndpointConfiguration.NetHttpOrdered_WSReliableMessagingFebruary2005_IWcfReliableService))
     {
         System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
         System.ServiceModel.Channels.ReliableSessionBindingElement reliableBindingElement = new System.ServiceModel.Channels.ReliableSessionBindingElement();
         result.Elements.Add(reliableBindingElement);
         result.Elements.Add(new System.ServiceModel.Channels.BinaryMessageEncodingBindingElement());
         System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
         httpBindingElement.AllowCookies           = true;
         httpBindingElement.MaxBufferSize          = int.MaxValue;
         httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
         result.Elements.Add(httpBindingElement);
         return(result);
     }
     if ((endpointConfiguration == EndpointConfiguration.NetHttpUnordered_WSReliableMessagingFebruary2005_IWcfReliableService))
     {
         System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
         System.ServiceModel.Channels.ReliableSessionBindingElement reliableBindingElement = new System.ServiceModel.Channels.ReliableSessionBindingElement();
         result.Elements.Add(reliableBindingElement);
         result.Elements.Add(new System.ServiceModel.Channels.BinaryMessageEncodingBindingElement());
         System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
         httpBindingElement.AllowCookies           = true;
         httpBindingElement.MaxBufferSize          = int.MaxValue;
         httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
         result.Elements.Add(httpBindingElement);
         return(result);
     }
     if ((endpointConfiguration == EndpointConfiguration.NetTcpOrdered_WSReliableMessaging11_IWcfReliableService))
     {
         System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
         System.ServiceModel.Channels.ReliableSessionBindingElement reliableBindingElement = new System.ServiceModel.Channels.ReliableSessionBindingElement();
         reliableBindingElement.ReliableMessagingVersion = System.ServiceModel.ReliableMessagingVersion.WSReliableMessaging11;
         result.Elements.Add(reliableBindingElement);
         result.Elements.Add(new System.ServiceModel.Channels.BinaryMessageEncodingBindingElement());
         System.ServiceModel.Channels.TcpTransportBindingElement tcpBindingElement = new System.ServiceModel.Channels.TcpTransportBindingElement();
         tcpBindingElement.MaxBufferSize          = int.MaxValue;
         tcpBindingElement.MaxReceivedMessageSize = int.MaxValue;
         result.Elements.Add(tcpBindingElement);
         return(result);
     }
     if ((endpointConfiguration == EndpointConfiguration.NetTcpUnordered_WSReliableMessaging11_IWcfReliableService))
     {
         System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
         System.ServiceModel.Channels.ReliableSessionBindingElement reliableBindingElement = new System.ServiceModel.Channels.ReliableSessionBindingElement();
         reliableBindingElement.Ordered = false;
         reliableBindingElement.ReliableMessagingVersion = System.ServiceModel.ReliableMessagingVersion.WSReliableMessaging11;
         result.Elements.Add(reliableBindingElement);
         result.Elements.Add(new System.ServiceModel.Channels.BinaryMessageEncodingBindingElement());
         System.ServiceModel.Channels.TcpTransportBindingElement tcpBindingElement = new System.ServiceModel.Channels.TcpTransportBindingElement();
         tcpBindingElement.MaxBufferSize          = int.MaxValue;
         tcpBindingElement.MaxReceivedMessageSize = int.MaxValue;
         result.Elements.Add(tcpBindingElement);
         return(result);
     }
     if ((endpointConfiguration == EndpointConfiguration.NetTcpOrdered_WSReliableMessagingFebruary2005_IWcfReliableService))
     {
         System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding();
         result.MaxBufferSize           = int.MaxValue;
         result.ReaderQuotas            = System.Xml.XmlDictionaryReaderQuotas.Max;
         result.MaxReceivedMessageSize  = int.MaxValue;
         result.Security.Mode           = System.ServiceModel.SecurityMode.None;
         result.ReliableSession.Enabled = true;
         return(result);
     }
     if ((endpointConfiguration == EndpointConfiguration.NetTcpUnordered_WSReliableMessagingFebruary2005_IWcfReliableService))
     {
         System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding();
         result.MaxBufferSize           = int.MaxValue;
         result.ReaderQuotas            = System.Xml.XmlDictionaryReaderQuotas.Max;
         result.MaxReceivedMessageSize  = int.MaxValue;
         result.Security.Mode           = System.ServiceModel.SecurityMode.None;
         result.ReliableSession.Enabled = true;
         return(result);
     }
     if ((endpointConfiguration == EndpointConfiguration.WSHttpOrdered_WSReliableMessaging11_IWcfReliableService))
     {
         System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
         System.ServiceModel.Channels.ReliableSessionBindingElement reliableBindingElement = new System.ServiceModel.Channels.ReliableSessionBindingElement();
         reliableBindingElement.ReliableMessagingVersion = System.ServiceModel.ReliableMessagingVersion.WSReliableMessaging11;
         result.Elements.Add(reliableBindingElement);
         System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
         result.Elements.Add(textBindingElement);
         System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
         httpBindingElement.AllowCookies           = true;
         httpBindingElement.MaxBufferSize          = int.MaxValue;
         httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
         result.Elements.Add(httpBindingElement);
         return(result);
     }
     if ((endpointConfiguration == EndpointConfiguration.WSHttpUnordered_WSReliableMessaging11_IWcfReliableService))
     {
         System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
         System.ServiceModel.Channels.ReliableSessionBindingElement reliableBindingElement = new System.ServiceModel.Channels.ReliableSessionBindingElement();
         reliableBindingElement.Ordered = false;
         reliableBindingElement.ReliableMessagingVersion = System.ServiceModel.ReliableMessagingVersion.WSReliableMessaging11;
         result.Elements.Add(reliableBindingElement);
         System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
         result.Elements.Add(textBindingElement);
         System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
         httpBindingElement.AllowCookies           = true;
         httpBindingElement.MaxBufferSize          = int.MaxValue;
         httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
         result.Elements.Add(httpBindingElement);
         return(result);
     }
     if ((endpointConfiguration == EndpointConfiguration.WSHttpOrdered_WSReliableMessagingFebruary2005_IWcfReliableService))
     {
         System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
         System.ServiceModel.Channels.ReliableSessionBindingElement reliableBindingElement = new System.ServiceModel.Channels.ReliableSessionBindingElement();
         result.Elements.Add(reliableBindingElement);
         System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
         result.Elements.Add(textBindingElement);
         System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
         httpBindingElement.AllowCookies           = true;
         httpBindingElement.MaxBufferSize          = int.MaxValue;
         httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
         result.Elements.Add(httpBindingElement);
         return(result);
     }
     if ((endpointConfiguration == EndpointConfiguration.WSHttpUnordered_WSReliableMessagingFebruary2005_IWcfReliableService))
     {
         System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
         System.ServiceModel.Channels.ReliableSessionBindingElement reliableBindingElement = new System.ServiceModel.Channels.ReliableSessionBindingElement();
         result.Elements.Add(reliableBindingElement);
         System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
         result.Elements.Add(textBindingElement);
         System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
         httpBindingElement.AllowCookies           = true;
         httpBindingElement.MaxBufferSize          = int.MaxValue;
         httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
         result.Elements.Add(httpBindingElement);
         return(result);
     }
     throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
 }