public GenericCommandTransaction(PopConnection connection, string command, bool isResponseMultiline)
            : base(connection)
        {
            IsResponseMultiline = isResponseMultiline;

              this.command = command;
        }
Exemplo n.º 2
0
        public StlsTransaction(PopConnection connection, UpgradeConnectionStreamCallback createAuthenticatedStreamCallback)
            : base(connection)
        {
            if (createAuthenticatedStreamCallback == null)
            throw new ArgumentNullException("createAuthenticatedStreamCallback");

              this.createAuthenticatedStreamCallback = createAuthenticatedStreamCallback;
        }
Exemplo n.º 3
0
        public AuthTransaction(PopConnection connection, SaslClientMechanism authMechanism)
            : base(connection)
        {
            if (authMechanism == null)
            throw new ArgumentNullException("authMechanism");

              this.saslMechanism = authMechanism;
              this.requiredCapability = null; // do not check capability
              this.disposeMechanism = false;
        }
Exemplo n.º 4
0
        public AuthTransaction(PopConnection connection, NetworkCredential credential)
            : base(connection)
        {
            if (credential == null)
            throw new ArgumentNullException("credential");

              this.credential = credential;
              this.requiredCapability = PopCapability.Sasl;
              this.disposeMechanism = true;
        }
Exemplo n.º 5
0
 public DeleTransaction(PopConnection connection)
     : base(connection)
 {
 }
Exemplo n.º 6
0
 public NoOpTransaction(PopConnection connection)
     : base(connection)
 {
 }
Exemplo n.º 7
0
 public UserTransaction(PopConnection connection)
     : base(connection)
 {
 }
Exemplo n.º 8
0
 public ApopTransaction(PopConnection connection)
     : base(connection)
 {
 }
Exemplo n.º 9
0
        /*
         * transaction methods : connect/disconnect
         */
        private void Connect(string host, int port, UpgradeConnectionStreamCallback createAuthenticatedStreamCallback)
        {
            TraceInfo("connecting");

              this.connection = new PopConnection(host, port, createAuthenticatedStreamCallback);

              TraceInfo("connected");

              using (var t = new GreetingTransaction(connection)) {
            try {
              if (ProcessTransaction(t).Failed)
            throw new PopConnectionException(string.Concat("connection refused or establishment failed: ", t.Result.ResultText));
            }
            catch (TimeoutException ex) {
              throw new PopConnectionException("connection timed out", ex);
            }

            timestamp = t.Result.Value;

            TransitStateTo(PopSessionState.Authorization);
              }

              if (ApopAvailable)
            TraceInfo("APOP is available, timestamp is {0}", timestamp);
        }
Exemplo n.º 10
0
        private void CloseConnection()
        {
            if (connection == null)
            return;

              try {
            TraceInfo("disconnecting");

            connection.Close();

            TraceInfo("disconnected");
              }
              finally {
            TransitStateTo(PopSessionState.NotConnected);

            connection = null;
              }
        }
 public SendCommandTransactionBase(PopConnection connection)
     : base(connection)
 {
 }
Exemplo n.º 12
0
 public RetrTransaction(PopConnection connection)
     : base(connection)
 {
 }
Exemplo n.º 13
0
 public PassTransaction(PopConnection connection)
     : base(connection)
 {
 }
Exemplo n.º 14
0
 public RsetTransaction(PopConnection connection)
     : base(connection)
 {
 }
Exemplo n.º 15
0
 public QuitTransaction(PopConnection connection)
     : base(connection)
 {
 }