public HttpPilotClient(IMarshallingFactory factory)
 {
     _client            = new TransportClient();
     _marshaller        = factory.GetMarshaller(new CallServiceAdapter(_client));
     _unmarshaller      = factory.GetUnmarshaller(this);
     _transportCallback = new CallbackReceiverAdapter(_unmarshaller, CallbackError);
 }
Exemple #2
0
        public Session(ISessionRegistry registry, int callbackTimeout, int sessionTimeout, OnSessionTimeout onSessionTimeout, IMarshallingFactory marshallingFactory)
        {
            _callbackTimeout  = callbackTimeout;
            _sessionTimeout   = sessionTimeout;
            _onSessionTimeout = onSessionTimeout;
            _registry         = registry;

            _id           = Guid.NewGuid();
            _session      = registry.NewSession(this, marshallingFactory);
            _sessionTimer = new Timer(SessionTimeout, null, sessionTimeout, Timeout.Infinite);
        }
 public HttpPilotClient(ConnectionCredentials credentials, IMarshallingFactory factory)
     : this(factory)
 {
     Connect(credentials);
 }