C# Class Stratosphere.Imap.ImapClient

Inheritance: IDisposable
Datei anzeigen Open project: petrohi/Stratosphere.Imap

Public Properties

Property Type Description
DefaultReadTimeout System.TimeSpan
ParseFailures EventHandler

Public Methods

Method Description
Dispose ( ) : void
FetchMessages ( long beginUid, long endUid, ImapFetchOption option ) : IEnumerable
FetchMessages ( long beginUid, long endUid, ImapFetchOption option, IEnumerable extensionParameterNames ) : IEnumerable
FetchSection ( long uid, ImapBodyPart part ) : object
FetchSection ( long uid, ImapBodyPart part, bool peek ) : object
FetchUids ( long beginNumber, long endNumber ) : IEnumerable
FetchUids ( long beginNumber, long endNumber, bool isUidSet ) : IEnumerable
ImapClient ( string hostName, int portNumber, bool enableSsl, NetworkCredential credentials ) : System
ListFolders ( string reference, string wildcard ) : IEnumerable
ListFoldersWithFlags ( string reference, string wildcard, bool useXList ) : IEnumerable>>.IEnumerable
SelectFolder ( string folderName ) : ImapFolder
SelectFolder ( string folderName, bool isReadonly ) : ImapFolder
SendReceive ( string command ) : SendReceiveResult
SetDeleted ( long beginUid, long endUid ) : void
TryLogin ( ) : bool
TrySaslLogin ( string mechanism, string data ) : bool

Private Methods

Method Description
CombineSplitLines ( string commandId, IEnumerable lines ) : IEnumerable
FormatSequence ( long begin, long end ) : string
FormatSequence ( long begin, long end, bool isUidSet ) : string
InitializeConnection ( ) : bool
IsLineBalanced ( bool isQuoted, int nonQuotedOpenBraceCount, int nonQuotedCloseBraceCount ) : bool
IsLineNonProtocolPrefix ( string line, string commandId ) : bool
IsLiteralSignalLine ( string line ) : bool
IsLiteralSignalLine ( string line, int &begin ) : bool
OnParseFailures ( IEnumerable details ) : void
ReadResponse ( StreamReader reader, string commandId ) : SendReceiveResult
ReadResponse ( StreamReader reader, string commandId, System.TimeSpan readTimeout ) : SendReceiveResult
SafeEnumerateLines ( IEnumerable lines, bool>.Func iterationOperation ) : void

Enumerates the lines, and if there is a handler specified for ParseFailures event, will just accumulate failure details, skipping to next line.. then once all lines are processed, fires the ParseFailures event with the details... if no handler is registered, then any exception will be thrown as-is, enumeration will stop, and no event is fired.

StoreFlag ( long beginUid, long endUid, string flag, FlagOperation operation ) : void
UpdateLineCounters ( string line, bool &isQuoted, int &accumulatedOpenBraceCount, int &accumulatedCloseBraceCount ) : void

Method Details

Dispose() public method

public Dispose ( ) : void
return void

FetchMessages() public method

public FetchMessages ( long beginUid, long endUid, ImapFetchOption option ) : IEnumerable
beginUid long
endUid long
option ImapFetchOption
return IEnumerable

FetchMessages() public method

public FetchMessages ( long beginUid, long endUid, ImapFetchOption option, IEnumerable extensionParameterNames ) : IEnumerable
beginUid long
endUid long
option ImapFetchOption
extensionParameterNames IEnumerable
return IEnumerable

FetchSection() public method

public FetchSection ( long uid, ImapBodyPart part ) : object
uid long
part ImapBodyPart
return object

FetchSection() public method

public FetchSection ( long uid, ImapBodyPart part, bool peek ) : object
uid long
part ImapBodyPart
peek bool
return object

FetchUids() public method

public FetchUids ( long beginNumber, long endNumber ) : IEnumerable
beginNumber long
endNumber long
return IEnumerable

FetchUids() public method

public FetchUids ( long beginNumber, long endNumber, bool isUidSet ) : IEnumerable
beginNumber long
endNumber long
isUidSet bool
return IEnumerable

ImapClient() public method

public ImapClient ( string hostName, int portNumber, bool enableSsl, NetworkCredential credentials ) : System
hostName string
portNumber int
enableSsl bool
credentials System.Net.NetworkCredential
return System

ListFolders() public method

public ListFolders ( string reference, string wildcard ) : IEnumerable
reference string
wildcard string
return IEnumerable

ListFoldersWithFlags() public method

public ListFoldersWithFlags ( string reference, string wildcard, bool useXList ) : IEnumerable>>.IEnumerable
reference string
wildcard string
useXList bool
return IEnumerable>>.IEnumerable

SelectFolder() public method

public SelectFolder ( string folderName ) : ImapFolder
folderName string
return ImapFolder

SelectFolder() public method

public SelectFolder ( string folderName, bool isReadonly ) : ImapFolder
folderName string
isReadonly bool
return ImapFolder

SendReceive() public method

public SendReceive ( string command ) : SendReceiveResult
command string
return SendReceiveResult

SetDeleted() public method

public SetDeleted ( long beginUid, long endUid ) : void
beginUid long
endUid long
return void

TryLogin() public method

public TryLogin ( ) : bool
return bool

TrySaslLogin() public method

public TrySaslLogin ( string mechanism, string data ) : bool
mechanism string
data string
return bool

Property Details

DefaultReadTimeout public_oe static_oe property

public static TimeSpan,System DefaultReadTimeout
return System.TimeSpan

ParseFailures public_oe property

public EventHandler ParseFailures
return EventHandler