Exemplo n.º 1
0
        public CustomChannelDispatcher(MyServiceManager serviceManager, IChannelListener<IReplyChannel> listener)
        {
            this.serviceManager = serviceManager;
            this.listener = listener;

            this.onReceive = new AsyncCallback(this.OnReceive);
            this.acceptCallback = new WaitCallback(this.AcceptCallback);
        }
Exemplo n.º 2
0
        public CustomChannelDispatcher(MyServiceManager serviceManager, IChannelListener <IReplyChannel> listener)
        {
            this.serviceManager = serviceManager;
            this.listener       = listener;

            this.onReceive      = new AsyncCallback(this.OnReceive);
            this.acceptCallback = new WaitCallback(this.AcceptCallback);
        }
Exemplo n.º 3
0
        public CustomServiceHostBase(params Uri[] baseAddresses)
        {
            for (int i = 0; i < baseAddresses.Length; i++)
            {
                if (object.ReferenceEquals(baseAddresses[i].Scheme, Uri.UriSchemeHttp))
                {
                    interestedUri = baseAddresses[i];
                    break;
                }
            }

            if (interestedUri == null)
            {
                throw new InvalidOperationException("You need to enable HTTP protocol for this application.");
            }

            serviceManager = new MyServiceManager();
            InitializeDescription(new UriSchemeKeyedCollection(baseAddresses));
        }
Exemplo n.º 4
0
        public CustomServiceHostBase(params Uri[] baseAddresses)
        {
            for (int i = 0; i < baseAddresses.Length; i++)
            {
                if (object.ReferenceEquals(baseAddresses[i].Scheme, Uri.UriSchemeHttp))
                {
                    interestedUri = baseAddresses[i];
                    break;
                }
            }

            if (interestedUri == null)
            {
                throw new InvalidOperationException("You need to enable HTTP protocol for this application.");
            }

            serviceManager = new MyServiceManager();
            InitializeDescription(new UriSchemeKeyedCollection(baseAddresses));
        }