C# Class MailKit.MailStore

An abstract mail store implementation.
An abstract mail store implementation.
Inheritance: MailService, IMailStore
Afficher le fichier Open project: jstedfast/MailKit

Méthodes publiques

Méthode Description
EnableQuickResync ( CancellationToken cancellationToken = default(CancellationToken) ) : void

Enable the quick resynchronization feature.

Enables quick resynchronization when a folder is opened using the MailFolder.Open(FolderAccess,uint,ulong,System.Collections.Generic.IList<UniqueId>,System.Threading.CancellationToken) method.

If this feature is enabled, the MailFolder.MessageExpunged event is replaced with the MailFolder.MessagesVanished event.

This method needs to be called immediately after calling one of the Authenticate methods, before opening any folders.

EnableQuickResyncAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously enable the quick resynchronization feature.

Enables quick resynchronization when a folder is opened using the MailFolder.Open(FolderAccess,uint,ulong,System.Collections.Generic.IList<UniqueId>,System.Threading.CancellationToken) method.

If this feature is enabled, the MailFolder.MessageExpunged event is replaced with the MailFolder.MessagesVanished event.

This method needs to be called immediately after calling one of the Authenticate methods, before opening any folders.

GetFolder ( FolderNamespace @namespace ) : IMailFolder

Get the folder for the specified namespace.

Gets the folder for the specified namespace.

GetFolder ( SpecialFolder folder ) : IMailFolder

Get the specified special folder.

Not all mail stores support special folders. Each implementation should provide a way to determine if special folders are supported.

GetFolder ( string path, CancellationToken cancellationToken = default(CancellationToken) ) : IMailFolder

Get the folder for the specified path.

Gets the folder for the specified path.

GetFolderAsync ( string path, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously get the folder for the specified path.

Asynchronously gets the folder for the specified path.

GetFolders ( FolderNamespace @namespace, StatusItems items = StatusItems.None, bool subscribedOnly = false, CancellationToken cancellationToken = default(CancellationToken) ) : IList

Get all of the folders within the specified namespace.

Gets all of the folders within the specified namespace.

GetFolders ( FolderNamespace @namespace, bool subscribedOnly, CancellationToken cancellationToken = default(CancellationToken) ) : IList

Get all of the folders within the specified namespace.

Gets all of the folders within the specified namespace.

GetFoldersAsync ( FolderNamespace @namespace, StatusItems items = StatusItems.None, bool subscribedOnly = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Asynchronously get all of the folders within the specified namespace.

Asynchronously gets all of the folders within the specified namespace.

GetFoldersAsync ( FolderNamespace @namespace, bool subscribedOnly, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Asynchronously get all of the folders within the specified namespace.

Asynchronously gets all of the folders within the specified namespace.

GetMetadata ( IEnumerable tags, CancellationToken cancellationToken = default(CancellationToken) ) : MetadataCollection

Gets the specified metadata.

Gets the specified metadata.

GetMetadata ( MetadataOptions options, IEnumerable tags, CancellationToken cancellationToken = default(CancellationToken) ) : MetadataCollection

Gets the specified metadata.

Gets the specified metadata.

GetMetadata ( MetadataTag tag, CancellationToken cancellationToken = default(CancellationToken) ) : string

Gets the specified metadata.

Gets the specified metadata.

GetMetadataAsync ( IEnumerable tags, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously gets the specified metadata.

Asynchronously gets the specified metadata.

GetMetadataAsync ( MetadataOptions options, IEnumerable tags, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously gets the specified metadata.

Asynchronously gets the specified metadata.

GetMetadataAsync ( MetadataTag tag, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously gets the specified metadata.

Asynchronously gets the specified metadata.

SetMetadata ( MetadataCollection metadata, CancellationToken cancellationToken = default(CancellationToken) ) : void

Sets the specified metadata.

Sets the specified metadata.

SetMetadataAsync ( MetadataCollection metadata, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously sets the specified metadata.

Asynchronously sets the specified metadata.

Méthodes protégées

Méthode Description
MailStore ( IProtocolLogger protocolLogger ) : System

Initializes a new instance of the MailKit.MailStore class.

Initializes a new instance of the MailKit.MailStore class.

OnAlert ( string message ) : void

Raise the alert event.

Raises the alert event.

Method Details

EnableQuickResync() public abstract méthode

Enable the quick resynchronization feature.

Enables quick resynchronization when a folder is opened using the MailFolder.Open(FolderAccess,uint,ulong,System.Collections.Generic.IList<UniqueId>,System.Threading.CancellationToken) method.

If this feature is enabled, the MailFolder.MessageExpunged event is replaced with the MailFolder.MessagesVanished event.

This method needs to be called immediately after calling one of the Authenticate methods, before opening any folders.

/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// Quick resynchronization needs to be enabled before selecting a folder. /// /// The mail store does not support quick resynchronization. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// A protocol error occurred. /// /// The command failed. ///
public abstract EnableQuickResync ( CancellationToken cancellationToken = default(CancellationToken) ) : void
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat void

EnableQuickResyncAsync() public méthode

Asynchronously enable the quick resynchronization feature.

Enables quick resynchronization when a folder is opened using the MailFolder.Open(FolderAccess,uint,ulong,System.Collections.Generic.IList<UniqueId>,System.Threading.CancellationToken) method.

If this feature is enabled, the MailFolder.MessageExpunged event is replaced with the MailFolder.MessagesVanished event.

This method needs to be called immediately after calling one of the Authenticate methods, before opening any folders.

/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// Quick resynchronization needs to be enabled before selecting a folder. /// /// The mail store does not support quick resynchronization. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// A protocol error occurred. /// /// The command failed. ///
public EnableQuickResyncAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

GetFolder() public abstract méthode

Get the folder for the specified namespace.
Gets the folder for the specified namespace.
/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The folder could not be found. ///
public abstract GetFolder ( FolderNamespace @namespace ) : IMailFolder
@namespace FolderNamespace
Résultat IMailFolder

GetFolder() public abstract méthode

Get the specified special folder.
Not all mail stores support special folders. Each implementation should provide a way to determine if special folders are supported.
/// is out of range. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. ///
public abstract GetFolder ( SpecialFolder folder ) : IMailFolder
folder SpecialFolder The type of special folder.
Résultat IMailFolder

GetFolder() public abstract méthode

Get the folder for the specified path.
Gets the folder for the specified path.
/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// The folder could not be found. /// /// An I/O error occurred. /// /// A protocol error occurred. /// /// The command failed. ///
public abstract GetFolder ( string path, CancellationToken cancellationToken = default(CancellationToken) ) : IMailFolder
path string The folder path.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat IMailFolder

GetFolderAsync() public méthode

Asynchronously get the folder for the specified path.
Asynchronously gets the folder for the specified path.
/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// The folder could not be found. /// /// An I/O error occurred. /// /// A protocol error occurred. /// /// The command failed. ///
public GetFolderAsync ( string path, CancellationToken cancellationToken = default(CancellationToken) ) : Task
path string The folder path.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

GetFolders() public abstract méthode

Get all of the folders within the specified namespace.
Gets all of the folders within the specified namespace.
/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// A protocol error occurred. /// /// The command failed. ///
public abstract GetFolders ( FolderNamespace @namespace, StatusItems items = StatusItems.None, bool subscribedOnly = false, CancellationToken cancellationToken = default(CancellationToken) ) : IList
@namespace FolderNamespace
items StatusItems The status items to pre-populate.
subscribedOnly bool If set to true, only subscribed folders will be listed.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat IList

GetFolders() public méthode

Get all of the folders within the specified namespace.
Gets all of the folders within the specified namespace.
/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// A protocol error occurred. /// /// The command failed. ///
public GetFolders ( FolderNamespace @namespace, bool subscribedOnly, CancellationToken cancellationToken = default(CancellationToken) ) : IList
@namespace FolderNamespace
subscribedOnly bool If set to true, only subscribed folders will be listed.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat IList

GetFoldersAsync() public méthode

Asynchronously get all of the folders within the specified namespace.
Asynchronously gets all of the folders within the specified namespace.
/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// A protocol error occurred. /// /// The command failed. ///
public GetFoldersAsync ( FolderNamespace @namespace, StatusItems items = StatusItems.None, bool subscribedOnly = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
@namespace FolderNamespace
items StatusItems The status items to pre-populate.
subscribedOnly bool If set to true, only subscribed folders will be listed.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task>

GetFoldersAsync() public méthode

Asynchronously get all of the folders within the specified namespace.
Asynchronously gets all of the folders within the specified namespace.
/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// A protocol error occurred. /// /// The command failed. ///
public GetFoldersAsync ( FolderNamespace @namespace, bool subscribedOnly, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
@namespace FolderNamespace
subscribedOnly bool If set to true, only subscribed folders will be listed.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task>

GetMetadata() public méthode

Gets the specified metadata.
Gets the specified metadata.
/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The folder does not support metadata. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The server's response contained unexpected tokens. /// /// The command failed. ///
public GetMetadata ( IEnumerable tags, CancellationToken cancellationToken = default(CancellationToken) ) : MetadataCollection
tags IEnumerable The metadata tags.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat MetadataCollection

GetMetadata() public abstract méthode

Gets the specified metadata.
Gets the specified metadata.
/// is null. /// -or- /// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The folder does not support metadata. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The server's response contained unexpected tokens. /// /// The command failed. ///
public abstract GetMetadata ( MetadataOptions options, IEnumerable tags, CancellationToken cancellationToken = default(CancellationToken) ) : MetadataCollection
options MetadataOptions The metadata options.
tags IEnumerable The metadata tags.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat MetadataCollection

GetMetadata() public abstract méthode

Gets the specified metadata.
Gets the specified metadata.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The folder does not support metadata. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The server's response contained unexpected tokens. /// /// The command failed. ///
public abstract GetMetadata ( MetadataTag tag, CancellationToken cancellationToken = default(CancellationToken) ) : string
tag MetadataTag The metadata tag.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat string

GetMetadataAsync() public méthode

Asynchronously gets the specified metadata.
Asynchronously gets the specified metadata.
/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The folder does not support metadata. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The server's response contained unexpected tokens. /// /// The command failed. ///
public GetMetadataAsync ( IEnumerable tags, CancellationToken cancellationToken = default(CancellationToken) ) : Task
tags IEnumerable The metadata tags.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

GetMetadataAsync() public méthode

Asynchronously gets the specified metadata.
Asynchronously gets the specified metadata.
/// is null. /// -or- /// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The folder does not support metadata. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The server's response contained unexpected tokens. /// /// The command failed. ///
public GetMetadataAsync ( MetadataOptions options, IEnumerable tags, CancellationToken cancellationToken = default(CancellationToken) ) : Task
options MetadataOptions The metadata options.
tags IEnumerable The metadata tags.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

GetMetadataAsync() public méthode

Asynchronously gets the specified metadata.
Asynchronously gets the specified metadata.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The folder does not support metadata. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The server's response contained unexpected tokens. /// /// The command failed. ///
public GetMetadataAsync ( MetadataTag tag, CancellationToken cancellationToken = default(CancellationToken) ) : Task
tag MetadataTag The metadata tag.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

MailStore() protected méthode

Initializes a new instance of the MailKit.MailStore class.
Initializes a new instance of the MailKit.MailStore class.
/// is null. ///
protected MailStore ( IProtocolLogger protocolLogger ) : System
protocolLogger IProtocolLogger The protocol logger.
Résultat System

OnAlert() protected méthode

Raise the alert event.
Raises the alert event.
/// is null. ///
protected OnAlert ( string message ) : void
message string The alert message.
Résultat void

SetMetadata() public abstract méthode

Sets the specified metadata.
Sets the specified metadata.
/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The folder does not support metadata. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The server's response contained unexpected tokens. /// /// The command failed. ///
public abstract SetMetadata ( MetadataCollection metadata, CancellationToken cancellationToken = default(CancellationToken) ) : void
metadata MetadataCollection The metadata.
cancellationToken CancellationToken The cancellation token.
Résultat void

SetMetadataAsync() public méthode

Asynchronously sets the specified metadata.
Asynchronously sets the specified metadata.
/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The folder does not support metadata. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The server's response contained unexpected tokens. /// /// The command failed. ///
public SetMetadataAsync ( MetadataCollection metadata, CancellationToken cancellationToken = default(CancellationToken) ) : Task
metadata MetadataCollection The metadata.
cancellationToken CancellationToken The cancellation token.
Résultat Task