Example #1
0
        private void Open(Type typeOfService, string serverAddress, Binding binding, string session,
                          SynchronizationContext syncContext)
        {
            this.SynchronizationContext = syncContext;
            _typeOfService = typeOfService;
            _serverAddress = serverAddress;
            _binding       = binding;
            _session       = session;
            var contract = AttributesReader.GetServiceContract(_typeOfService);

            Debug.Assert(contract.CallbackContract != null);
            //BUG: should be used only for non polling HTTM, all others should go via provided single channel
            var address = _serverAddress + _session.Replace("-", "");

            _callbackServer = new CallbackServiceHost(this, address, _behaviour);
            _callbackServer.AddServiceEndpoint(contract.CallbackContract, new Guid(_session), _binding, address);
            _callbackServer.Open();
        }
Example #2
0
        private void Open(Type typeOfService, string serverAddress, Binding binding, string session,
                          SynchronizationContext syncContext)
        {
            this.SynchronizationContext = syncContext;
            _typeOfService = typeOfService;
            _serverAddress = serverAddress;
            _binding = binding;
            _session = session;
            var contract = AttributesReader.GetServiceContract(_typeOfService);

            Debug.Assert(contract.CallbackContract != null);
            //BUG: should be used only for non polling HTTM, all others should go via provided single channel
            var address = _serverAddress + _session.Replace("-", "");

            _callbackServer = new CallbackServiceHost(this, address, _behaviour);
            _callbackServer.AddServiceEndpoint(contract.CallbackContract, new Guid(_session), _binding, address);
            _callbackServer.Open();
        }