protected async Task EndWithResultAsync( IImapMessageChannel channel, CommandResult result, TagMessageData tags, string text, CancellationToken cancellationToken) { if (result == CommandResult.Ok && text == null) { text = CommandName + " completed"; } if (tags == null) { await channel.CommandCompletedAsync(GetResultMessage(result, new ServerMessageData(text)), this, cancellationToken); } else { await channel.CommandCompletedAsync( GetResultMessage(result, tags, new ServerMessageData(text)), this, cancellationToken); } }
public CreateCommandFactory( IImapMessageChannel channel, IImapMailStore mailstore) { _channel = channel; _mailstore = mailstore; }
public RenameCommand( IImapMessageChannel channel, IImapMailStore mailstore) { _channel = channel; _mailstore = mailstore; }
public static Task SendMessageAsync( this IImapMessageChannel channel, ImapMessage message, CancellationToken cancellationToken) { return(channel.SendMessageAsync(message, DefaultEncoding, cancellationToken)); }
public AuthenticateCommand( IIndex <string, Lazy <IAuthenticationSession, AuthencticationMechanismMetadata> > auth, IImapMessageChannel channel) { _auth = auth; _channel = channel; }
protected Task EndWithResultAsync( IImapMessageChannel channel, CommandResult result, string text, CancellationToken cancellationToken) { return(EndWithResultAsync(channel, result, null, text, cancellationToken)); }
public CapabilityCommand( IConnectionSecurity connection, IEnumerable <Lazy <IAuthenticationSession, AuthencticationMechanismMetadata> > auth, IImapMessageChannel channel) { _connection = connection; _auth = auth; _channel = channel; }
protected ExamineOrSelectCommand( IImapMailStore mailstore, IImapMessageChannel channel, IImapMailboxPointer mailboxPointer) { _mailstore = mailstore; _channel = channel; _mailboxPointer = mailboxPointer; }
public static Task ReportBadAsync( IImapMessageChannel imapSession, string tag, string errorText, CancellationToken cancellationToken) { var message = new ImapMessage(tag, "BAD", new List <IMessageData> { new ServerMessageData(errorText) }); return(imapSession.SendMessageAsync(message, DefaultEncoding, cancellationToken)); }
public StartTlsCommand(SecurableConnection connection, IImapMessageChannel channel) { _connection = connection; _channel = channel; }
public ExamineCommand(IImapMailStore mailstore, IImapMessageChannel channel, IImapMailboxPointer mailboxPointer) : base(mailstore, channel, mailboxPointer) { }
public NoopCommand(IImapMessageChannel channel) { _channel = channel; }
public SearchCommand(IImapMessageChannel channel) { _channel = channel; }
public StoreCommand(IImapMailStore mailstore, IImapMessageChannel channel, IImapMailboxPointer mailboxPointer) { _mailstore = mailstore; _channel = channel; _mailboxPointer = mailboxPointer; }
public LSubCommand(IImapMessageChannel channel, IImapMailStore mailstore) : base(channel, mailstore) { }
public CheckCommand(IImapMessageChannel channel) { _channel = channel; }
public LoginCommand(IImapMessageChannel channel, IUserStore userstore) { _channel = channel; _userstore = userstore; }
protected SubscribeOrUnsubscribeCommand(IImapMessageChannel channel, IImapMailStore mailstore) { _channel = channel; _mailstore = mailstore; }
public LogoutCommand(IImapMessageChannel channel) { _channel = channel; }
protected ListOrLSubCommand(IImapMessageChannel channel, IImapMailStore mailstore) { _channel = channel; _mailstore = mailstore; }
public ExpungeCommand(IImapMessageChannel channel, IImapMailboxPointer mailboxPointer) { _channel = channel; _mailboxPointer = mailboxPointer; }
public DeleteCommand(IImapMailStore mailstore, IImapMessageChannel channel) { _mailstore = mailstore; _channel = channel; }
protected Task EndOkAsync(IImapMessageChannel channel, string message, CancellationToken cancellationToken) { return(EndWithResultAsync(channel, CommandResult.Ok, message, cancellationToken)); }
public UnsubscribeCommand(IImapMessageChannel channel, IImapMailStore mailstore) : base(channel, mailstore) { }