Exemplo n.º 1
0
 MsmqTransportBindingElement(MsmqTransportBindingElement elementToBeCloned)
     : base(elementToBeCloned)
 {
     this.useActiveDirectory    = elementToBeCloned.useActiveDirectory;
     this.maxPoolSize           = elementToBeCloned.maxPoolSize;
     this.queueTransferProtocol = elementToBeCloned.queueTransferProtocol;
 }
Exemplo n.º 2
0
        public MsmqChannelListener(MsmqTransportBindingElement source,
                                   BindingContext context)
            : base(context.Binding)
        {
            if (context.ListenUriMode == ListenUriMode.Explicit)
            {
                listen_uri = new Uri(context.ListenUriBaseAddress, context.ListenUriRelativeAddress);
            }
            else
            {
                // FIXME: consider ListenUriMode.Unique
                throw new NotImplementedException();
            }

            foreach (BindingElement be in context.RemainingBindingElements)
            {
                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                if (mbe != null)
                {
                    encoder = CreateEncoder <TChannel> (mbe);
                    break;
                }
            }
            if (encoder == null)
            {
                encoder = new BinaryMessageEncoder();
            }
        }
Exemplo n.º 3
0
 protected MsmqChannelFactory(MsmqTransportBindingElement bindingElement, BindingContext context)
     : base(bindingElement, context)
 {
     this.maxPoolSize           = bindingElement.MaxPoolSize;
     this.queueTransferProtocol = bindingElement.QueueTransferProtocol;
     this.useActiveDirectory    = bindingElement.UseActiveDirectory;
 }
 public MsmqChannelFactory(MsmqTransportBindingElement source, BindingContext ctx)
 {
     this.source = source;
     foreach (BindingElement be in ctx.Binding.Elements)
     {
         MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
         if (mbe != null)
         {
             encoder = CreateEncoder <TChannel> (mbe);
             break;
         }
     }
     if (encoder == null)
     {
         encoder = new BinaryMessageEncoder();
     }
 }
        static TransportBindingElement CreateTransportBindingElements(string transportUri, PolicyConversionContext policyContext)
        {
            TransportBindingElement transportBindingElement = null;

            // Try and Create TransportBindingElement
            switch (transportUri)
            {
            case TransportPolicyConstants.HttpTransportUri:
                transportBindingElement = GetHttpTransportBindingElement(policyContext);
                break;

            case TransportPolicyConstants.TcpTransportUri:
                transportBindingElement = new TcpTransportBindingElement();
                break;

            case TransportPolicyConstants.NamedPipeTransportUri:
                transportBindingElement = new NamedPipeTransportBindingElement();
                break;

            case TransportPolicyConstants.MsmqTransportUri:
                transportBindingElement = new MsmqTransportBindingElement();
                break;

            case TransportPolicyConstants.PeerTransportUri:
#pragma warning disable 0618
                transportBindingElement = new PeerTransportBindingElement();
#pragma warning restore 0618
                break;

            case TransportPolicyConstants.WebSocketTransportUri:
                HttpTransportBindingElement httpTransport = GetHttpTransportBindingElement(policyContext);
                httpTransport.WebSocketSettings.TransportUsage = WebSocketTransportUsage.Always;
                httpTransport.WebSocketSettings.SubProtocol    = WebSocketTransportSettings.SoapSubProtocol;
                transportBindingElement = httpTransport;
                break;

            default:
                // There may be another registered converter that can handle this transport.
                break;
            }

            return(transportBindingElement);
        }
Exemplo n.º 6
0
 internal MsmqTransportReceiveParameters(MsmqTransportBindingElement bindingElement, MsmqUri.IAddressTranslator addressTranslator) : base(bindingElement, addressTranslator)
 {
     this.maxPoolSize           = bindingElement.MaxPoolSize;
     this.useActiveDirectory    = bindingElement.UseActiveDirectory;
     this.queueTransferProtocol = bindingElement.QueueTransferProtocol;
 }
Exemplo n.º 7
0
 internal MsmqOutputChannelFactory(MsmqTransportBindingElement bindingElement, BindingContext context) : base(bindingElement, context)
 {
 }