Example #1
0
        public Connection(ITransport transport, ConnectionInfo info)
        {
            this.transport = transport;
            this.info = info;
            this.transport.Command = new CommandHandler(OnCommand);
			this.transport.Exception = new ExceptionHandler(OnException);
            this.transport.Start();
        }
 // Implementation methods
 
 protected virtual ConnectionInfo CreateConnectionInfo(string userName, string password)
 {
     ConnectionInfo answer = new ConnectionInfo();
     ConnectionId connectionId = new ConnectionId();
     connectionId.Value = CreateNewGuid();
     
     answer.ConnectionId = connectionId;
     answer.UserName = userName;
     answer.Password = password;
     answer.ClientId = clientId;
     if (clientId == null)
     {
         answer.ClientId = CreateNewGuid();
     }
     return answer;
 }