public void RegisterSessionHandler(Type handlerType, SessionHandlerOptions options)
        {
            IMessageSessionAsyncHandlerFactory messageSessionAsyncHandlerFactory = MessageSessionHandlerFactory.Create(handlerType);

            MessageSessionPumpHost.RegisterSessionHandlerFactoryAsyncResult registerSessionHandlerFactoryAsyncResult = new MessageSessionPumpHost.RegisterSessionHandlerFactoryAsyncResult(this, messageSessionAsyncHandlerFactory, options, null, null);
            registerSessionHandlerFactoryAsyncResult.RunSynchronously();
        }
 public RegisterSessionHandlerFactoryAsyncResult(MessageSessionPumpHost owner, IMessageSessionAsyncHandlerFactory factory, SessionHandlerOptions options, AsyncCallback callback, object state) : base(TimeSpan.MaxValue, callback, state)
 {
     this.owner   = owner;
     this.factory = factory;
     this.options = options;
     MessageSessionPumpHost.RegisterSessionHandlerFactoryAsyncResult registerSessionHandlerFactoryAsyncResult = this;
     registerSessionHandlerFactoryAsyncResult.OnCompleting = (Action <AsyncResult, Exception>)Delegate.Combine(registerSessionHandlerFactoryAsyncResult.OnCompleting, MessageSessionPumpHost.RegisterSessionHandlerFactoryAsyncResult.OnFinally);
 }
 public Task RegisterSessionHandlerFactoryAsync(IMessageSessionAsyncHandlerFactory factory, SessionHandlerOptions options)
 {
     return _client.RegisterSessionHandlerFactoryAsync(factory, options);
 }
Esempio n. 4
0
 Task ClientContext.RegisterSessionHandlerFactoryAsync(IMessageSessionAsyncHandlerFactory factory,
                                                       EventHandler <ExceptionReceivedEventArgs> exceptionHandler)
 {
     return(_context.RegisterSessionHandlerFactoryAsync(factory, exceptionHandler));
 }
        private IAsyncResult BeginRegisterSessionHandler(Type handlerType, SessionHandlerOptions options, AsyncCallback callback, object state)
        {
            IMessageSessionAsyncHandlerFactory messageSessionAsyncHandlerFactory = MessageSessionHandlerFactory.Create(handlerType);

            return((new MessageSessionPumpHost.RegisterSessionHandlerFactoryAsyncResult(this, messageSessionAsyncHandlerFactory, options, callback, state)).Start());
        }
 private IAsyncResult BeginRegisterSessionHandler(IMessageSessionAsyncHandlerFactory factory, SessionHandlerOptions options, AsyncCallback callback, object state)
 {
     return((new MessageSessionPumpHost.RegisterSessionHandlerFactoryAsyncResult(this, factory, options, callback, state)).Start());
 }
 public Task RegisterSessionHandlerFactoryAsync(IMessageSessionAsyncHandlerFactory factory, SessionHandlerOptions options)
 {
     return(TaskHelpers.CreateTask((AsyncCallback c, object s) => this.BeginRegisterSessionHandler(factory, options, c, s), (IAsyncResult r) => this.EndRegisterSessionHandler(r)));
 }
 public void RegisterSessionHandlerFactory(IMessageSessionAsyncHandlerFactory factory, SessionHandlerOptions options)
 {
     MessageSessionPumpHost.RegisterSessionHandlerFactoryAsyncResult registerSessionHandlerFactoryAsyncResult = new MessageSessionPumpHost.RegisterSessionHandlerFactoryAsyncResult(this, factory, options, null, null);
     registerSessionHandlerFactoryAsyncResult.RunSynchronously();
 }
Esempio n. 9
0
 public Task RegisterSessionHandlerFactoryAsync(IMessageSessionAsyncHandlerFactory factory, SessionHandlerOptions options)
 {
     return(_client.RegisterSessionHandlerFactoryAsync(factory, options));
 }
Esempio n. 10
0
 public Task RegisterSessionHandlerFactoryAsync(IMessageSessionAsyncHandlerFactory factory, EventHandler <ExceptionReceivedEventArgs> exceptionHandler)
 {
     return(_client.RegisterSessionHandlerFactoryAsync(factory, _settings.GetSessionHandlerOptions(exceptionHandler)));
 }