コード例 #1
0
        protected Binding CreateEventServiceBinding(string address)
        {
            IChannelController[] controllers;
            // add mandatory controllers.
            // _trafficListener is used to monitor data sent and received via Client.
            // _semaphore is used to stop waiting for the answer.

            EndpointController controller = new EndpointController(new EndpointAddress(address));

            WsaController wsaController = new WsaController();

            controllers = new IChannelController[]
            {
                _trafficListener,
                _semaphore,
                _credentialsProvider,
                controller,
                wsaController,
                new SoapValidator(EventsSchemasSet.GetInstance())
            };

            Binding binding = CreateBinding(controllers);

            return(binding);
        }
コード例 #2
0
        public override EventPortTypeClient CreateClient(Binding binding, EndpointAddress address)
        {
            EndpointController controller = new EndpointController(new EndpointAddress(_serviceAddress));

            WsaController wsaController = new WsaController();
            Binding       eventBinding  = new HttpBinding(new IChannelController[] { this, controller, wsaController, _credentialsProvider });

            return(new EventPortTypeClient(eventBinding, address));
        }