// // MailFolder.cs // // Author: Jeffrey Stedfast // // Copyright (c) 2013-2020 .NET Foundation and Contributors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // using System; using System.IO; using System.Threading; using System.Collections; using System.Threading.Tasks; using System.Collections.Generic; using MimeKit; using MailKit.Search; namespace MailKit { /// /// An abstract mail folder implementation. /// /// /// An abstract mail folder implementation. /// public abstract class MailFolder : IMailFolder { /// /// The bit mask of settable flags. /// /// /// Only flags in the list of settable flags may be set on a message by the client. /// protected static readonly MessageFlags SettableFlags = MessageFlags.Answered | MessageFlags.Deleted | MessageFlags.Draft | MessageFlags.Flagged | MessageFlags.Seen; IMailFolder parent; /// /// Initialize a new instance of the class. /// /// /// Initializes a new instance of the class. /// protected MailFolder () { } /// /// Get an object that can be used to synchronize access to the folder. /// /// /// Gets an object that can be used to synchronize access to the folder. /// /// The sync root. public abstract object SyncRoot { get; } /// /// Get the parent folder. /// /// /// Root-level folders do not have a parent folder. /// /// The parent folder. public IMailFolder ParentFolder { get { return parent; } internal protected set { if (value == parent) return; if (parent != null) parent.Renamed -= OnParentFolderRenamed; parent = value; if (parent != null) parent.Renamed += OnParentFolderRenamed; } } /// /// Get the folder attributes. /// /// /// Gets the folder attributes. /// /// The folder attributes. public FolderAttributes Attributes { get; internal protected set; } /// /// Get the annotation access level. /// /// /// If annotations are supported, this property can be used to determine whether or not /// the supports reading and writing annotations. /// public AnnotationAccess AnnotationAccess { get; internal protected set; } /// /// Get the supported annotation scopes. /// /// /// If annotations are supported, this property can be used to determine which /// annotation scopes are supported by the . /// public AnnotationScope AnnotationScopes { get; internal protected set; } /// /// Get the maximum size of annotation values supported by the folder. /// /// /// If annotations are supported, this property can be used to determine the /// maximum size of annotation values supported by the . /// public uint MaxAnnotationSize { get; internal protected set; } /// /// Get the permanent flags. /// /// /// The permanent flags are the message flags that will persist between sessions. /// If the flag is set, then the folder allows /// storing of user-defined (custom) message flags. /// /// The permanent flags. public MessageFlags PermanentFlags { get; protected set; } /// /// Get the accepted flags. /// /// /// The accepted flags are the message flags that will be accepted and persist /// for the current session. For the set of flags that will persist between /// sessions, see the property. /// /// The accepted flags. public MessageFlags AcceptedFlags { get; protected set; } /// /// Get the directory separator. /// /// /// Gets the directory separator. /// /// The directory separator. public char DirectorySeparator { get; protected set; } /// /// Get the read/write access of the folder. /// /// /// Gets the read/write access of the folder. /// /// The read/write access. public FolderAccess Access { get; internal protected set; } /// /// Get whether or not the folder is a namespace folder. /// /// /// Gets whether or not the folder is a namespace folder. /// /// true if the folder is a namespace folder; otherwise, false. public bool IsNamespace { get; protected set; } /// /// Get the full name of the folder. /// /// /// This is the equivalent of the full path of a file on a file system. /// /// The full name of the folder. public string FullName { get; protected set; } /// /// Get the name of the folder. /// /// /// This is the equivalent of the file name of a file on the file system. /// /// The name of the folder. public string Name { get; protected set; } /// /// Get the unique identifier for the folder, if available. /// /// /// Gets a unique identifier for the folder, if available. This is useful for clients /// implementing a message cache that want to track the folder after it is renamed by another /// client. /// This property will only be available if the server supports the /// OBJECTID extension. /// /// The unique folder identifier. public string Id { get; protected set; } /// /// Get a value indicating whether the folder is subscribed. /// /// /// Gets a value indicating whether the folder is subscribed. /// /// true if the folder is subscribed; otherwise, false. public bool IsSubscribed { get { return (Attributes & FolderAttributes.Subscribed) != 0; } } /// /// Get a value indicating whether the folder is currently open. /// /// /// Gets a value indicating whether the folder is currently open. /// /// true if the folder is currently open; otherwise, false. public abstract bool IsOpen { get; } /// /// Get a value indicating whether the folder exists. /// /// /// Gets a value indicating whether the folder exists. /// /// true if the folder exists; otherwise, false. public bool Exists { get { return (Attributes & FolderAttributes.NonExistent) == 0; } } /// /// Get whether or not the folder supports mod-sequences. /// /// /// Gets whether or not the folder supports mod-sequences. /// If mod-sequences are not supported by the folder, then all of the APIs that take a modseq /// argument will throw and should not be used. /// /// true if supports mod-sequences; otherwise, false. [Obsolete ("Use Supports (FolderFeature.ModSequences) instead.")] public bool SupportsModSeq { get { return Supports (FolderFeature.ModSequences); } } /// /// Get the highest mod-sequence value of all messages in the mailbox. /// /// /// Gets the highest mod-sequence value of all messages in the mailbox. /// /// The highest mod-sequence value. public ulong HighestModSeq { get; protected set; } /// /// Get the UID validity. /// /// /// UIDs are only valid so long as the UID validity value remains unchanged. If and when /// the folder's is changed, a client MUST discard its cache of UIDs /// along with any summary information that it may have and re-query the folder. /// This value will only be set after the folder has been opened. /// /// The UID validity. public uint UidValidity { get; protected set; } /// /// Get the UID that the folder will assign to the next message that is added. /// /// /// This value will only be set after the folder has been opened. /// /// The next UID. public UniqueId? UidNext { get; protected set; } /// /// Get the maximum size of a message that can be appended to the folder. /// /// /// Gets the maximum size of a message that can be appended to the folder. /// If the value is not set, then the limit is unspecified. /// /// The append limit. public uint? AppendLimit { get; protected set; } /// /// Get the size of the folder. /// /// /// Gets the size of the folder in bytes. /// If the value is not set, then the size is unspecified. /// /// The size. public ulong? Size { get; protected set; } /// /// Get the index of the first unread message in the folder. /// /// /// This value will only be set after the folder has been opened. /// /// The index of the first unread message. public int FirstUnread { get; protected set; } /// /// Get the number of unread messages in the folder. /// /// /// Gets the number of unread messages in the folder. /// This value will only be set after calling /// /// with . /// /// The number of unread messages. public int Unread { get; protected set; } /// /// Get the number of recently added messages in the folder. /// /// /// Gets the number of recently delivered messages in the folder. /// This value will only be set after calling /// /// with or by opening the folder. /// /// The number of recently added messages. public int Recent { get; protected set; } /// /// Get the total number of messages in the folder. /// /// /// Gets the total number of messages in the folder. /// This value will only be set after calling /// /// with or by opening the folder. /// /// The total number of messages. public int Count { get; protected set; } /// /// Get the threading algorithms supported by the folder. /// /// /// Get the threading algorithms supported by the folder. /// /// The supported threading algorithms. public abstract HashSet ThreadingAlgorithms { get; } /// /// Determine whether or not a supports a feature. /// /// /// Determines whether or not a supports a feature. /// /// The desired feature. /// true if the feature is supported; otherwise, false. public abstract bool Supports (FolderFeature feature); /// /// Opens the folder using the requested folder access. /// /// /// This variant of the /// method is meant for quick resynchronization of the folder. Before calling this method, /// the method MUST be called. /// You should also make sure to add listeners to the and /// events to get notifications of changes since /// the last time the folder was opened. /// /// The state of the folder. /// The requested folder access. /// The last known value. /// The last known value. /// The last known list of unique message identifiers. /// The cancellation token. /// /// is not a valid value. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The quick resynchronization feature has not been enabled. /// /// /// The mail store does not support the quick resynchronization feature. /// /// /// 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 FolderAccess Open (FolderAccess access, uint uidValidity, ulong highestModSeq, IList uids, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously opens the folder using the requested folder access. /// /// /// This variant of the /// method is meant for quick resynchronization of the folder. Before calling this method, /// the method MUST be called. /// You should also make sure to add listeners to the and /// events to get notifications of changes since /// the last time the folder was opened. /// /// The state of the folder. /// The requested folder access. /// The last known value. /// The last known value. /// The last known list of unique message identifiers. /// The cancellation token. /// /// is not a valid value. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The quick resynchronization feature has not been enabled. /// /// /// The mail store does not support the quick resynchronization feature. /// /// /// 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 Task OpenAsync (FolderAccess access, uint uidValidity, ulong highestModSeq, IList uids, CancellationToken cancellationToken = default (CancellationToken)); /// /// Open the folder using the requested folder access. /// /// /// Opens the folder using the requested folder access. /// /// The state of the folder. /// The requested folder access. /// The cancellation token. /// /// is not a valid value. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// 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 FolderAccess Open (FolderAccess access, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously open the folder using the requested folder access. /// /// /// Asynchronously opens the folder using the requested folder access. /// /// The state of the folder. /// The requested folder access. /// The cancellation token. /// /// is not a valid value. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// 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 Task OpenAsync (FolderAccess access, CancellationToken cancellationToken = default (CancellationToken)); /// /// Close the folder, optionally expunging the messages marked for deletion. /// /// /// Closes the folder, optionally expunging the messages marked for deletion. /// /// If set to true, expunge. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 void Close (bool expunge = false, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously close the folder, optionally expunging the messages marked for deletion. /// /// /// Asynchronously closes the folder, optionally expunging the messages marked for deletion. /// /// An asynchronous task context. /// If set to true, expunge. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task CloseAsync (bool expunge = false, CancellationToken cancellationToken = default (CancellationToken)); /// /// Create a new subfolder with the given name. /// /// /// Creates a new subfolder with the given name. /// /// The created folder. /// The name of the folder to create. /// true if the folder will be used to contain messages; otherwise false. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is nil, and thus child folders cannot be created. /// /// /// 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 IMailFolder Create (string name, bool isMessageFolder, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously create a new subfolder with the given name. /// /// /// Asynchronously creates a new subfolder with the given name. /// /// The created folder. /// The name of the folder to create. /// true if the folder will be used to contain messages; otherwise false. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is nil, and thus child folders cannot be created. /// /// /// 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 Task CreateAsync (string name, bool isMessageFolder, CancellationToken cancellationToken = default (CancellationToken)); /// /// Create a new subfolder with the given name. /// /// /// Creates a new subfolder with the given name. /// /// The created folder. /// The name of the folder to create. /// A list of special uses for the folder being created. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// is empty. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is nil, and thus child folders cannot be created. /// /// /// The does not support the creation of special folders. /// /// /// 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 IMailFolder Create (string name, IEnumerable specialUses, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously create a new subfolder with the given name. /// /// /// Asynchronously creates a new subfolder with the given name. /// /// The created folder. /// The name of the folder to create. /// A list of special uses for the folder being created. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// is empty. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is nil, and thus child folders cannot be created. /// /// /// The does not support the creation of special folders. /// /// /// 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 Task CreateAsync (string name, IEnumerable specialUses, CancellationToken cancellationToken = default (CancellationToken)); /// /// Create a new subfolder with the given name. /// /// /// Creates a new subfolder with the given name. /// /// The created folder. /// The name of the folder to create. /// The special use for the folder being created. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is nil, and thus child folders cannot be created. /// /// /// The does not support the creation of special folders. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IMailFolder Create (string name, SpecialFolder specialUse, CancellationToken cancellationToken = default (CancellationToken)) { return Create (name, new [] { specialUse }, cancellationToken); } /// /// Asynchronously create a new subfolder with the given name. /// /// /// Asynchronously creates a new subfolder with the given name. /// /// The created folder. /// The name of the folder to create. /// The special use for the folder being created. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is nil, and thus child folders cannot be created. /// /// /// The does not support the creation of special folders. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task CreateAsync (string name, SpecialFolder specialUse, CancellationToken cancellationToken = default (CancellationToken)) { return CreateAsync (name, new [] { specialUse }, cancellationToken); } /// /// Rename the folder. /// /// /// Renames the folder. /// /// The new parent folder. /// The new name of the folder. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// does not belong to the . /// -or- /// is not a legal folder name. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder cannot be renamed (it is either a namespace or the Inbox). /// /// /// The does not exist. /// /// /// 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 void Rename (IMailFolder parent, string name, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously rename the folder. /// /// /// Asynchronously renames the folder. /// /// An asynchronous task context. /// The new parent folder. /// The new name of the folder. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// does not belong to the . /// -or- /// is not a legal folder name. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder cannot be renamed (it is either a namespace or the Inbox). /// /// /// The does not exist. /// /// /// 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 Task RenameAsync (IMailFolder parent, string name, CancellationToken cancellationToken = default (CancellationToken)); /// /// Delete the folder. /// /// /// Deletes the folder. /// /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder cannot be deleted (it is either a namespace or the Inbox). /// /// /// The does not exist. /// /// /// 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 void Delete (CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously delete the folder. /// /// /// Asynchronously deletes the folder. /// /// An asynchronous task context. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder cannot be deleted (it is either a namespace or the Inbox). /// /// /// The does not exist. /// /// /// 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 Task DeleteAsync (CancellationToken cancellationToken = default (CancellationToken)); /// /// Subscribe to the folder. /// /// /// Subscribes to the folder. /// /// The cancellation token. /// /// 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. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract void Subscribe (CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously subscribe to the folder. /// /// /// Asynchronously subscribes to the folder. /// /// An asynchronous task context. /// The cancellation token. /// /// 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. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract Task SubscribeAsync (CancellationToken cancellationToken = default (CancellationToken)); /// /// Unsubscribe from the folder. /// /// /// Unsubscribes from the folder. /// /// The cancellation token. /// /// 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. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract void Unsubscribe (CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously unsubscribe from the folder. /// /// /// Asynchronously unsubscribes from the folder. /// /// An asynchronous task context. /// The cancellation token. /// /// 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. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract Task UnsubscribeAsync (CancellationToken cancellationToken = default (CancellationToken)); /// /// Get the subfolders. /// /// /// Gets the subfolders as well as queries the server for the status of the requested items. /// When the argument is non-empty, this has the equivalent functionality /// of calling and then calling /// on each of the returned folders. /// /// The subfolders. /// The status items to pre-populate. /// If set to true, only subscribed folders will be listed. /// The cancellation token. /// /// 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. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract IList GetSubfolders (StatusItems items, bool subscribedOnly = false, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously get the subfolders. /// /// /// Asynchronously gets the subfolders as well as queries the server for the status of the requested items. /// When the argument is non-empty, this has the equivalent functionality /// of calling and then calling /// on each of the returned folders. /// /// The subfolders. /// The status items to pre-populate. /// If set to true, only subscribed folders will be listed. /// The cancellation token. /// /// 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. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract Task> GetSubfoldersAsync (StatusItems items, bool subscribedOnly = false, CancellationToken cancellationToken = default (CancellationToken)); /// /// Get the subfolders. /// /// /// Gets the subfolders. /// /// The subfolders. /// If set to true, only subscribed folders will be listed. /// The cancellation token. /// /// 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. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IList GetSubfolders (bool subscribedOnly = false, CancellationToken cancellationToken = default (CancellationToken)) { return GetSubfolders (StatusItems.None, subscribedOnly, cancellationToken); } /// /// Asynchronously get the subfolders. /// /// /// Asynchronously gets the subfolders. /// /// The subfolders. /// If set to true, only subscribed folders will be listed. /// The cancellation token. /// /// 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. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> GetSubfoldersAsync (bool subscribedOnly = false, CancellationToken cancellationToken = default (CancellationToken)) { return GetSubfoldersAsync (StatusItems.None, subscribedOnly, cancellationToken); } /// /// Get the specified subfolder. /// /// /// Gets the specified subfolder. /// /// The subfolder. /// The name of the subfolder. /// The cancellation token. /// /// is null. /// /// /// is either an empty string or contains the . /// /// /// 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. /// /// /// The requested folder could not be found. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract IMailFolder GetSubfolder (string name, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously get the specified subfolder. /// /// /// Asynchronously gets the specified subfolder. /// /// The subfolder. /// The name of the subfolder. /// The cancellation token. /// /// is null. /// /// /// is either an empty string or contains the . /// /// /// 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. /// /// /// The requested folder could not be found. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract Task GetSubfolderAsync (string name, CancellationToken cancellationToken = default (CancellationToken)); /// /// Force the server to flush its state for the folder. /// /// /// Forces the server to flush its state for the folder. /// /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 void Check (CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously force the server to flush its state for the folder. /// /// /// Asynchronously forces the server to flush its state for the folder. /// /// An asynchronous task context. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task CheckAsync (CancellationToken cancellationToken = default (CancellationToken)); /// /// Update the values of the specified items. /// /// /// Updates the values of the specified items. /// The method /// MUST NOT be used on a folder that is already in the opened state. Instead, other ways /// of getting the desired information should be used. /// For example, a common use for the /// method is to get the number of unread messages in the folder. When the folder is open, however, it is /// possible to use the /// method to query for the list of unread messages. /// /// The items to update. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The mail store does not support the STATUS command. /// /// /// 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 void Status (StatusItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously update the values of the specified items. /// /// /// Updates the values of the specified items. /// The method /// MUST NOT be used on a folder that is already in the opened state. Instead, other ways /// of getting the desired information should be used. /// For example, a common use for the /// method is to get the number of unread messages in the folder. When the folder is open, however, it is /// possible to use the /// method to query for the list of unread messages. /// /// An asynchronous task context. /// The items to update. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the STATUS command. /// /// /// 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 Task StatusAsync (StatusItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Get the complete access control list for the folder. /// /// /// Gets the complete access control list for the folder. /// /// The access control list. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 AccessControlList GetAccessControlList (CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously get the complete access control list for the folder. /// /// /// Asynchronously gets the complete access control list for the folder. /// /// The access control list. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 Task GetAccessControlListAsync (CancellationToken cancellationToken = default (CancellationToken)); /// /// Get the access rights for a particular identifier. /// /// /// Gets the access rights for a particular identifier. /// /// The access rights. /// The identifier name. /// The cancellation token. /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 AccessRights GetAccessRights (string name, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously get the access rights for a particular identifier. /// /// /// Asynchronously gets the access rights for a particular identifier. /// /// The access rights. /// The identifier name. /// The cancellation token. /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 Task GetAccessRightsAsync (string name, CancellationToken cancellationToken = default (CancellationToken)); /// /// Get the access rights for the current authenticated user. /// /// /// Gets the access rights for the current authenticated user. /// /// The access rights. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 AccessRights GetMyAccessRights (CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously get the access rights for the current authenticated user. /// /// /// Asynchronously gets the access rights for the current authenticated user. /// /// The access rights. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 Task GetMyAccessRightsAsync (CancellationToken cancellationToken = default (CancellationToken)); /// /// Add access rights for the specified identity. /// /// /// Adds the given access rights for the specified identity. /// /// The identity name. /// The access rights. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 void AddAccessRights (string name, AccessRights rights, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously add access rights for the specified identity. /// /// /// Asynchronously adds the given access rights for the specified identity. /// /// An asynchronous task context. /// The identity name. /// The access rights. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 Task AddAccessRightsAsync (string name, AccessRights rights, CancellationToken cancellationToken = default (CancellationToken)); /// /// Remove access rights for the specified identity. /// /// /// Removes the given access rights for the specified identity. /// /// The identity name. /// The access rights. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 void RemoveAccessRights (string name, AccessRights rights, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously remove access rights for the specified identity. /// /// /// Asynchronously removes the given access rights for the specified identity. /// /// An asynchronous task context. /// The identity name. /// The access rights. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 Task RemoveAccessRightsAsync (string name, AccessRights rights, CancellationToken cancellationToken = default (CancellationToken)); /// /// Set the access rights for the specified identity. /// /// /// Sets the access rights for the specified identity. /// /// The identity name. /// The access rights. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 void SetAccessRights (string name, AccessRights rights, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously set the access rights for the specified identity. /// /// /// Asynchronously sets the access rights for the specified identity. /// /// An asynchronous task context. /// The identity name. /// The access rights. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 Task SetAccessRightsAsync (string name, AccessRights rights, CancellationToken cancellationToken = default (CancellationToken)); /// /// Remove all access rights for the given identity. /// /// /// Removes all access rights for the given identity. /// /// The identity name. /// The cancellation token. /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 void RemoveAccess (string name, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously remove all access rights for the given identity. /// /// /// Asynchronously removes all access rights for the given identity. /// /// An asynchronous task context. /// The identity name. /// The cancellation token. /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support the ACL extension. /// /// /// 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 Task RemoveAccessAsync (string name, CancellationToken cancellationToken = default (CancellationToken)); /// /// Get the quota information for the folder. /// /// /// Gets the quota information for the folder. /// To determine if a quotas are supported, check the /// property. /// /// The folder quota. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support quotas. /// /// /// 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 FolderQuota GetQuota (CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously get the quota information for the folder. /// /// /// Asynchronously gets the quota information for the folder. /// To determine if a quotas are supported, check the /// property. /// /// The folder quota. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support quotas. /// /// /// 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 Task GetQuotaAsync (CancellationToken cancellationToken = default (CancellationToken)); /// /// Set the quota limits for the folder. /// /// /// Sets the quota limits for the folder. /// To determine if a quotas are supported, check the /// property. /// /// The updated folder quota. /// If not null, sets the maximum number of messages to allow. /// If not null, sets the maximum storage size (in kilobytes). /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support quotas. /// /// /// 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 FolderQuota SetQuota (uint? messageLimit, uint? storageLimit, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously set the quota limits for the folder. /// /// /// Asynchronously sets the quota limits for the folder. /// To determine if a quotas are supported, check the /// property. /// /// The updated folder quota. /// If not null, sets the maximum number of messages to allow. /// If not null, sets the maximum storage size (in kilobytes). /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The mail store does not support quotas. /// /// /// 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 Task SetQuotaAsync (uint? messageLimit, uint? storageLimit, CancellationToken cancellationToken = default (CancellationToken)); /// /// Get the specified metadata. /// /// /// Gets the specified metadata. /// /// The requested metadata value. /// The metadata tag. /// The cancellation token. /// /// 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 string GetMetadata (MetadataTag tag, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously gets the specified metadata. /// /// /// Asynchronously gets the specified metadata. /// /// The requested metadata value. /// The metadata tag. /// The cancellation token. /// /// 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 Task GetMetadataAsync (MetadataTag tag, CancellationToken cancellationToken = default (CancellationToken)); /// /// Get the specified metadata. /// /// /// Gets the specified metadata. /// /// The requested metadata. /// The metadata tags. /// The cancellation token. /// /// 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 MetadataCollection GetMetadata (IEnumerable tags, CancellationToken cancellationToken = default (CancellationToken)) { return GetMetadata (new MetadataOptions (), tags, cancellationToken); } /// /// Asynchronously gets the specified metadata. /// /// /// Asynchronously gets the specified metadata. /// /// The requested metadata. /// The metadata tags. /// The cancellation token. /// /// 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 virtual Task GetMetadataAsync (IEnumerable tags, CancellationToken cancellationToken = default (CancellationToken)) { return GetMetadataAsync (new MetadataOptions (), tags, cancellationToken); } /// /// Get the specified metadata. /// /// /// Gets the specified metadata. /// /// The requested metadata. /// The metadata options. /// The metadata tags. /// The cancellation token. /// /// 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 MetadataCollection GetMetadata (MetadataOptions options, IEnumerable tags, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously gets the specified metadata. /// /// /// Asynchronously gets the specified metadata. /// /// The requested metadata. /// The metadata options. /// The metadata tags. /// The cancellation token. /// /// 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 Task GetMetadataAsync (MetadataOptions options, IEnumerable tags, CancellationToken cancellationToken = default (CancellationToken)); /// /// Sets the specified metadata. /// /// /// Sets the specified metadata. /// /// The metadata. /// The cancellation token. /// /// 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 void SetMetadata (MetadataCollection metadata, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously sets the specified metadata. /// /// /// Asynchronously sets the specified metadata. /// /// An asynchronous task context. /// The metadata. /// The cancellation token. /// /// 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 Task SetMetadataAsync (MetadataCollection metadata, CancellationToken cancellationToken = default (CancellationToken)); /// /// Expunge the folder, permanently removing all messages marked for deletion. /// /// /// Expunges the folder, permanently removing all messages marked for deletion. /// Normally, an event will be emitted for /// each message that is expunged. However, if the mail store supports the quick /// resynchronization feature and it has been enabled via the /// method, then /// the event will be emitted rather than the /// event. /// /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void Expunge (CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously expunge the folder, permanently removing all messages marked for deletion. /// /// /// Asynchronously expunges the folder, permanently removing all messages marked for deletion. /// Normally, an event will be emitted for /// each message that is expunged. However, if the mail store supports the quick /// resynchronization feature and it has been enabled via the /// method, then /// the event will be emitted rather than the /// event. /// /// An asynchronous task context. /// The cancellation token. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task ExpungeAsync (CancellationToken cancellationToken = default (CancellationToken)); /// /// Expunge the specified uids, permanently removing them from the folder. /// /// /// Expunges the specified uids, permanently removing them from the folder. /// Normally, an event will be emitted for /// each message that is expunged. However, if the mail store supports the quick /// resynchronization feature and it has been enabled via the /// method, then /// the event will be emitted rather than the /// event. /// /// The message uids. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void Expunge (IList uids, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously expunge the specified uids, permanently removing them from the folder. /// /// /// Asynchronously expunges the specified uids, permanently removing them from the folder. /// Normally, an event will be emitted for /// each message that is expunged. However, if the mail store supports the quick /// resynchronization feature and it has been enabled via the /// method, then /// the event will be emitted rather than the /// event. /// /// An asynchronous task context. /// The message uids. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task ExpungeAsync (IList uids, CancellationToken cancellationToken = default (CancellationToken)); /// /// Append the specified message to the folder. /// /// /// Appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual UniqueId? Append (MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return Append (FormatOptions.Default, message, flags, cancellationToken, progress); } /// /// Asynchronously append the specified message to the folder. /// /// /// Asynchronously appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task AppendAsync (MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return AppendAsync (FormatOptions.Default, message, flags, cancellationToken, progress); } /// /// Append the specified message to the folder. /// /// /// Appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual UniqueId? Append (MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return Append (FormatOptions.Default, message, flags, date, cancellationToken, progress); } /// /// Asynchronously append the specified message to the folder. /// /// /// Asynchronously appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task AppendAsync (MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return AppendAsync (FormatOptions.Default, message, flags, date, cancellationToken, progress); } /// /// Append the specified message to the folder. /// /// /// Appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The message. /// The message flags. /// The received date of the message. /// The message annotations. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// One or more does not define any properties. /// " /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual UniqueId? Append (MimeMessage message, MessageFlags flags, DateTimeOffset? date, IList annotations, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return Append (FormatOptions.Default, message, flags, date, annotations, cancellationToken, progress); } /// /// Asynchronously append the specified message to the folder. /// /// /// Asynchronously appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The message. /// The message flags. /// The received date of the message. /// The message annotations. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// One or more does not define any properties. /// " /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task AppendAsync (MimeMessage message, MessageFlags flags, DateTimeOffset? date, IList annotations, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return AppendAsync (FormatOptions.Default, message, flags, date, annotations, cancellationToken, progress); } /// /// Append the specified message to the folder. /// /// /// Appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The formatting options. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract UniqueId? Append (FormatOptions options, MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously append the specified message to the folder. /// /// /// Asynchronously appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The formatting options. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract Task AppendAsync (FormatOptions options, MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Append the specified message to the folder. /// /// /// Appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The formatting options. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract UniqueId? Append (FormatOptions options, MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously append the specified message to the folder. /// /// /// Asynchronously appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The formatting options. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract Task AppendAsync (FormatOptions options, MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Append the specified message to the folder. /// /// /// Appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The formatting options. /// The message. /// The message flags. /// The received date of the message. /// The message annotations. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract UniqueId? Append (FormatOptions options, MimeMessage message, MessageFlags flags, DateTimeOffset? date, IList annotations, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously append the specified message to the folder. /// /// /// Asynchronously appends the specified message to the folder and returns the UniqueId assigned to the message. /// /// The UID of the appended message, if available; otherwise, null. /// The formatting options. /// The message. /// The message flags. /// The received date of the message. /// The message annotations. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract Task AppendAsync (FormatOptions options, MimeMessage message, MessageFlags flags, DateTimeOffset? date, IList annotations, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Append the specified messages to the folder. /// /// /// Appends the specified messages to the folder and returns the UniqueIds assigned to the messages. /// /// The UIDs of the appended messages, if available; otherwise an empty array. /// The array of messages to append to the folder. /// The message flags to use for each message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is null. /// -or- /// The number of messages does not match the number of flags. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IList Append (IList messages, IList flags, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return Append (FormatOptions.Default, messages, flags, cancellationToken, progress); } /// /// Asynchronously append the specified messages to the folder. /// /// /// Asynchronously appends the specified messages to the folder and returns the UniqueIds assigned to the messages. /// /// The UIDs of the appended messages, if available; otherwise an empty array. /// The array of messages to append to the folder. /// The message flags to use for each message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is null. /// -or- /// The number of messages does not match the number of flags. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> AppendAsync (IList messages, IList flags, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return AppendAsync (FormatOptions.Default, messages, flags, cancellationToken, progress); } /// /// Append the specified messages to the folder. /// /// /// Appends the specified messages to the folder and returns the UniqueIds assigned to the messages. /// /// The UIDs of the appended messages, if available; otherwise an empty array. /// The array of messages to append to the folder. /// The message flags to use for each of the messages. /// The received dates to use for each of the messages. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// -or- /// is null. /// /// /// One or more of the is null. /// -or- /// The number of messages, flags, and dates do not match. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IList Append (IList messages, IList flags, IList dates, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return Append (FormatOptions.Default, messages, flags, dates, cancellationToken, progress); } /// /// Asynchronously append the specified messages to the folder. /// /// /// Asynchronously appends the specified messages to the folder and returns the UniqueIds assigned to the messages. /// /// The UIDs of the appended messages, if available; otherwise an empty array. /// The array of messages to append to the folder. /// The message flags to use for each of the messages. /// The received dates to use for each of the messages. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// -or- /// is null. /// /// /// One or more of the is null. /// -or- /// The number of messages, flags, and dates do not match. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> AppendAsync (IList messages, IList flags, IList dates, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return AppendAsync (FormatOptions.Default, messages, flags, dates, cancellationToken, progress); } /// /// Append the specified messages to the folder. /// /// /// Appends the specified messages to the folder and returns the UniqueIds assigned to the messages. /// /// The UIDs of the appended messages, if available; otherwise an empty array. /// The formatting options. /// The array of messages to append to the folder. /// The message flags to use for each message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// -or- /// is null. /// /// /// One or more of the is null. /// -or- /// The number of messages does not match the number of flags. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract IList Append (FormatOptions options, IList messages, IList flags, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously append the specified messages to the folder. /// /// /// Asynchronously appends the specified messages to the folder and returns the UniqueIds assigned to the messages. /// /// The UIDs of the appended messages, if available; otherwise an empty array. /// The formatting options. /// The array of messages to append to the folder. /// The message flags to use for each message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// -or- /// is null. /// /// /// One or more of the is null. /// -or- /// The number of messages does not match the number of flags. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract Task> AppendAsync (FormatOptions options, IList messages, IList flags, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Append the specified messages to the folder. /// /// /// Appends the specified messages to the folder and returns the UniqueIds assigned to the messages. /// /// The UIDs of the appended messages, if available; otherwise an empty array. /// The formatting options. /// The array of messages to append to the folder. /// The message flags to use for each of the messages. /// The received dates to use for each of the messages. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// -or- /// is null. /// -or- /// is null. /// /// /// One or more of the is null. /// -or- /// The number of messages, flags, and dates do not match. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract IList Append (FormatOptions options, IList messages, IList flags, IList dates, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously append the specified messages to the folder. /// /// /// Asynchronously appends the specified messages to the folder and returns the UniqueIds assigned to the messages. /// /// The UIDs of the appended messages, if available; otherwise an empty array. /// The formatting options. /// The array of messages to append to the folder. /// The message flags to use for each of the messages. /// The received dates to use for each of the messages. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// -or- /// is null. /// -or- /// is null. /// /// /// One or more of the is null. /// -or- /// The number of messages, flags, and dates do not match. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public abstract Task> AppendAsync (FormatOptions options, IList messages, IList flags, IList dates, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The UID of the message to be replaced. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public virtual UniqueId? Replace (UniqueId uid, MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return Replace (FormatOptions.Default, uid, message, flags, cancellationToken, progress); } /// /// Asynchronously replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The UID of the message to be replaced. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public virtual Task ReplaceAsync (UniqueId uid, MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return ReplaceAsync (FormatOptions.Default, uid, message, flags, cancellationToken, progress); } /// /// Replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The UID of the message to be replaced. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public virtual UniqueId? Replace (UniqueId uid, MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return Replace (FormatOptions.Default, uid, message, flags, date, cancellationToken, progress); } /// /// Asynchronously replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The UID of the message to be replaced. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public virtual Task ReplaceAsync (UniqueId uid, MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return ReplaceAsync (FormatOptions.Default, uid, message, flags, date, cancellationToken, progress); } /// /// Replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The formatting options. /// The UID of the message to be replaced. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public abstract UniqueId? Replace (FormatOptions options, UniqueId uid, MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The formatting options. /// The UID of the message to be replaced. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public abstract Task ReplaceAsync (FormatOptions options, UniqueId uid, MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The formatting options. /// The UID of the message to be replaced. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public abstract UniqueId? Replace (FormatOptions options, UniqueId uid, MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The formatting options. /// The UID of the message to be replaced. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public abstract Task ReplaceAsync (FormatOptions options, UniqueId uid, MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The index of the message to be replaced. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public virtual UniqueId? Replace (int index, MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return Replace (FormatOptions.Default, index, message, flags, cancellationToken, progress); } /// /// Asynchronously replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The index of the message to be replaced. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public virtual Task ReplaceAsync (int index, MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return ReplaceAsync (FormatOptions.Default, index, message, flags, cancellationToken, progress); } /// /// Replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The index of the message to be replaced. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public virtual UniqueId? Replace (int index, MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return Replace (FormatOptions.Default, index, message, flags, date, cancellationToken, progress); } /// /// Asynchronously replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The index of the message to be replaced. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public virtual Task ReplaceAsync (int index, MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { return ReplaceAsync (FormatOptions.Default, index, message, flags, date, cancellationToken, progress); } /// /// Replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The formatting options. /// The index of the message to be replaced. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public abstract UniqueId? Replace (FormatOptions options, int index, MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The formatting options. /// The index of the message to be replaced. /// The message. /// The message flags. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public abstract Task ReplaceAsync (FormatOptions options, int index, MimeMessage message, MessageFlags flags = MessageFlags.None, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The formatting options. /// The index of the message to be replaced. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public abstract UniqueId? Replace (FormatOptions options, int index, MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously replace a message in the folder. /// /// /// Replaces the specified message in the folder and returns the UniqueId assigned to the new message. /// /// The UID of the new message, if available; otherwise, null. /// The formatting options. /// The index of the message to be replaced. /// The message. /// The message flags. /// The received date of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// -or- /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// Internationalized formatting was requested but has not been enabled. /// /// /// The does not exist. /// /// /// The is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// Internationalized formatting was requested but is not supported by the server. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The server replied with a NO or BAD response. /// public abstract Task ReplaceAsync (FormatOptions options, int index, MimeMessage message, MessageFlags flags, DateTimeOffset date, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Copy the specified message to the destination folder. /// /// /// Copies the specified message to the destination folder. /// /// The UID of the message in the destination folder, if available; otherwise, null. /// The UID of the message to copy. /// The destination folder. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The mail store does not support the UIDPLUS extension. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual UniqueId? CopyTo (UniqueId uid, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)) { if (destination == null) throw new ArgumentNullException (nameof (destination)); var uids = CopyTo (new [] { uid }, destination, cancellationToken); if (uids != null && uids.Destination.Count > 0) return uids.Destination[0]; return null; } /// /// Asynchronously copy the specified message to the destination folder. /// /// /// Asynchronously copies the specified message to the destination folder. /// /// The UID of the message in the destination folder, if available; otherwise, null. /// The UID of the message to copy. /// The destination folder. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The mail store does not support the UIDPLUS extension. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual async Task CopyToAsync (UniqueId uid, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)) { if (destination == null) throw new ArgumentNullException (nameof (destination)); var uids = await CopyToAsync (new [] { uid }, destination, cancellationToken).ConfigureAwait (false); if (uids != null && uids.Destination.Count > 0) return uids.Destination[0]; return null; } /// /// Copy the specified messages to the destination folder. /// /// /// Copies the specified messages to the destination folder. /// /// The UID mapping of the messages in the destination folder, if available; otherwise an empty mapping. /// The UIDs of the messages to copy. /// The destination folder. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The mail store does not support the UIDPLUS extension. /// /// /// 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 UniqueIdMap CopyTo (IList uids, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously copy the specified messages to the destination folder. /// /// /// Asynchronously copies the specified messages to the destination folder. /// /// The UID mapping of the messages in the destination folder, if available; otherwise an empty mapping. /// The UIDs of the messages to copy. /// The destination folder. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The mail store does not support the UIDPLUS extension. /// /// /// 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 Task CopyToAsync (IList uids, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)); /// /// Move the specified message to the destination folder. /// /// /// Moves the specified message to the destination folder. /// /// The UID of the message in the destination folder, if available; otherwise, null. /// The UID of the message to move. /// The destination folder. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The mail store does not support the UIDPLUS extension. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual UniqueId? MoveTo (UniqueId uid, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)) { if (destination == null) throw new ArgumentNullException (nameof (destination)); var uids = MoveTo (new [] { uid }, destination, cancellationToken); if (uids != null && uids.Destination.Count > 0) return uids.Destination[0]; return null; } /// /// Asynchronously move the specified message to the destination folder. /// /// /// Asynchronously moves the specified message to the destination folder. /// /// The UID of the message in the destination folder, if available; otherwise, null. /// The UID of the message to move. /// The destination folder. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The mail store does not support the UIDPLUS extension. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual async Task MoveToAsync (UniqueId uid, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)) { if (destination == null) throw new ArgumentNullException (nameof (destination)); var uids = await MoveToAsync (new [] { uid }, destination, cancellationToken).ConfigureAwait (false); if (uids != null && uids.Destination.Count > 0) return uids.Destination[0]; return null; } /// /// Move the specified messages to the destination folder. /// /// /// Moves the specified messages to the destination folder. /// /// The UID mapping of the messages in the destination folder, if available; otherwise an empty mapping. /// The UIDs of the messages to move. /// The destination folder. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The mail store does not support the UIDPLUS extension. /// /// /// 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 UniqueIdMap MoveTo (IList uids, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously move the specified messages to the destination folder. /// /// /// Asynchronously moves the specified messages to the destination folder. /// /// The UID mapping of the messages in the destination folder, if available; otherwise an empty mapping. /// The UIDs of the messages to move. /// The destination folder. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The mail store does not support the UIDPLUS extension. /// /// /// 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 Task MoveToAsync (IList uids, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)); /// /// Copy the specified message to the destination folder. /// /// /// Copies the specified message to the destination folder. /// /// The index of the message to copy. /// The destination folder. /// The cancellation token. /// /// is null. /// /// /// does not refer to a valid message index. /// /// /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void CopyTo (int index, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)) { if (index < 0 || index >= Count) throw new ArgumentOutOfRangeException (nameof (index)); if (destination == null) throw new ArgumentNullException (nameof (destination)); CopyTo (new [] { index }, destination, cancellationToken); } /// /// Asynchronously copy the specified message to the destination folder. /// /// /// Asynchronously copies the specified message to the destination folder. /// /// An asynchronous task context. /// The indexes of the message to copy. /// The destination folder. /// The cancellation token. /// /// is null. /// /// /// does not refer to a valid message index. /// /// /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task CopyToAsync (int index, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)) { if (index < 0 || index >= Count) throw new ArgumentOutOfRangeException (nameof (index)); if (destination == null) throw new ArgumentNullException (nameof (destination)); return CopyToAsync (new [] { index }, destination, cancellationToken); } /// /// Copy the specified messages to the destination folder. /// /// /// Copies the specified messages to the destination folder. /// /// The indexes of the messages to copy. /// The destination folder. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 void CopyTo (IList indexes, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously copy the specified messages to the destination folder. /// /// /// Asynchronously copies the specified messages to the destination folder. /// /// An asynchronous task context. /// The indexes of the messages to copy. /// The destination folder. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task CopyToAsync (IList indexes, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)); /// /// Move the specified message to the destination folder. /// /// /// Moves the specified message to the destination folder. /// /// The index of the message to move. /// The destination folder. /// The cancellation token. /// /// is null. /// /// /// does not refer to a valid message index. /// /// /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void MoveTo (int index, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)) { if (index < 0 || index >= Count) throw new ArgumentOutOfRangeException (nameof (index)); if (destination == null) throw new ArgumentNullException (nameof (destination)); MoveTo (new [] { index }, destination, cancellationToken); } /// /// Asynchronously move the specified message to the destination folder. /// /// /// Asynchronously moves the specified message to the destination folder. /// /// An asynchronous task context. /// The index of the message to move. /// The destination folder. /// The cancellation token. /// /// is null. /// /// /// does not refer to a valid message index. /// /// /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task MoveToAsync (int index, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)) { if (index < 0 || index >= Count) throw new ArgumentOutOfRangeException (nameof (index)); if (destination == null) throw new ArgumentNullException (nameof (destination)); return MoveToAsync (new [] { index }, destination, cancellationToken); } /// /// Move the specified messages to the destination folder. /// /// /// Moves the specified messages to the destination folder. /// /// The indexes of the messages to move. /// The destination folder. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void MoveTo (IList indexes, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously move the specified messages to the destination folder. /// /// /// Asynchronously moves the specified messages to the destination folder. /// /// An asynchronous task context. /// The indexes of the messages to move. /// The destination folder. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// The destination folder does not belong to the . /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task MoveToAsync (IList indexes, IMailFolder destination, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message UIDs. /// /// /// Fetches the message summaries for the specified message UIDs. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// /// /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The message summary items to fetch. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Fetch (IList uids, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message UIDs. /// /// /// Asynchronously fetches the message summaries for the specified message /// UIDs. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The message summary items to fetch. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> FetchAsync (IList uids, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message UIDs. /// /// /// Fetches the message summaries for the specified message UIDs. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Fetch (IList uids, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message UIDs. /// /// /// Asynchronously fetches the message summaries for the specified message /// UIDs. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> FetchAsync (IList uids, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message UIDs. /// /// /// Fetches the message summaries for the specified message UIDs. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Fetch (IList uids, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message UIDs. /// /// /// Asynchronously fetches the message summaries for the specified message /// UIDs. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> FetchAsync (IList uids, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message UIDs that have a /// higher mod-sequence value than the one specified. /// /// /// Fetches the message summaries for the specified message UIDs that /// have a higher mod-sequence value than the one specified. /// If the mail store supports quick resynchronization and the application has /// enabled this feature via , /// then this method will emit events for messages that /// have vanished since the specified mod-sequence value. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The mod-sequence value. /// The message summary items to fetch. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 IList Fetch (IList uids, ulong modseq, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message UIDs that have a /// higher mod-sequence value than the one specified. /// /// /// Asynchronously fetches the message summaries for the specified message UIDs that /// have a higher mod-sequence value than the one specified. /// If the mail store supports quick resynchronization and the application has /// enabled this feature via , /// then this method will emit events for messages that /// have vanished since the specified mod-sequence value. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The mod-sequence value. /// The message summary items to fetch. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> FetchAsync (IList uids, ulong modseq, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message UIDs that have a /// higher mod-sequence value than the one specified. /// /// /// Fetches the message summaries for the specified message UIDs that /// have a higher mod-sequence value than the one specified. /// If the mail store supports quick resynchronization and the application has /// enabled this feature via , /// then this method will emit events for messages that /// have vanished since the specified mod-sequence value. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 IList Fetch (IList uids, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message UIDs that have a /// higher mod-sequence value than the one specified. /// /// /// Asynchronously fetches the message summaries for the specified message UIDs that /// have a higher mod-sequence value than the one specified. /// If the mail store supports quick resynchronization and the application has /// enabled this feature via , /// then this method will emit events for messages that /// have vanished since the specified mod-sequence value. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> FetchAsync (IList uids, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message UIDs that have a /// higher mod-sequence value than the one specified. /// /// /// Fetches the message summaries for the specified message UIDs that /// have a higher mod-sequence value than the one specified. /// If the mail store supports quick resynchronization and the application has /// enabled this feature via , /// then this method will emit events for messages that /// have vanished since the specified mod-sequence value. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 IList Fetch (IList uids, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message UIDs that have a /// higher mod-sequence value than the one specified. /// /// /// Asynchronously fetches the message summaries for the specified message UIDs that /// have a higher mod-sequence value than the one specified. /// If the mail store supports quick resynchronization and the application has /// enabled this feature via , /// then this method will emit events for messages that /// have vanished since the specified mod-sequence value. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The UIDs. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> FetchAsync (IList uids, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message indexes. /// /// /// Fetches the message summaries for the specified message indexes. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The message summary items to fetch. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Fetch (IList indexes, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message indexes. /// /// /// Asynchronously fetches the message summaries for the specified message /// indexes. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The message summary items to fetch. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> FetchAsync (IList indexes, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message indexes. /// /// /// Fetches the message summaries for the specified message indexes. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Fetch (IList indexes, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message indexes. /// /// /// Asynchronously fetches the message summaries for the specified message /// indexes. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> FetchAsync (IList indexes, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message indexes. /// /// /// Fetches the message summaries for the specified message indexes. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Fetch (IList indexes, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message indexes. /// /// /// Asynchronously fetches the message summaries for the specified message /// indexes. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> FetchAsync (IList indexes, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message indexes that have a /// higher mod-sequence value than the one specified. /// /// /// Fetches the message summaries for the specified message indexes that /// have a higher mod-sequence value than the one specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The mod-sequence value. /// The message summary items to fetch. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 IList Fetch (IList indexes, ulong modseq, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message indexes that /// have a higher mod-sequence value than the one specified. /// /// /// Asynchronously fetches the message summaries for the specified message /// indexes that have a higher mod-sequence value than the one specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The mod-sequence value. /// The message summary items to fetch. /// The cancellation token. /// /// is null. /// /// /// is empty. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> FetchAsync (IList indexes, ulong modseq, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message indexes that /// have a higher mod-sequence value than the one specified. /// /// /// Fetches the message summaries for the specified message indexes that /// have a higher mod-sequence value than the one specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Fetch (IList indexes, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message indexes that /// have a higher mod-sequence value than the one specified. /// /// /// Asynchronously fetches the message summaries for the specified message /// indexes that have a higher mod-sequence value than the one specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> FetchAsync (IList indexes, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the specified message indexes that /// have a higher mod-sequence value than the one specified. /// /// /// Fetches the message summaries for the specified message indexes that /// have a higher mod-sequence value than the one specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Fetch (IList indexes, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the specified message indexes that /// have a higher mod-sequence value than the one specified. /// /// /// Asynchronously fetches the message summaries for the specified message /// indexes that have a higher mod-sequence value than the one specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The indexes. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> FetchAsync (IList indexes, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the messages between the two indexes, inclusive. /// /// /// Fetches the message summaries for the messages between the two /// indexes, inclusive. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The message summary items to fetch. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// -or- /// is empty. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Fetch (int min, int max, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the messages between the two indexes, inclusive. /// /// /// Asynchronously fetches the message summaries for the messages between /// the two indexes, inclusive. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The message summary items to fetch. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// -or- /// is empty. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> FetchAsync (int min, int max, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the messages between the two indexes, inclusive. /// /// /// Fetches the message summaries for the messages between the two /// indexes, inclusive. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Fetch (int min, int max, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the messages between the two indexes, inclusive. /// /// /// Asynchronously fetches the message summaries for the messages between /// the two indexes, inclusive. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> FetchAsync (int min, int max, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the messages between the two indexes, inclusive. /// /// /// Fetches the message summaries for the messages between the two /// indexes, inclusive. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// /// /// is null. /// /// /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Fetch (int min, int max, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the messages between the two indexes, inclusive. /// /// /// Asynchronously fetches the message summaries for the messages between /// the two indexes, inclusive. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// /// /// is null. /// /// /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> FetchAsync (int min, int max, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the messages between the two indexes (inclusive) /// that have a higher mod-sequence value than the one specified. /// /// /// Fetches the message summaries for the messages between the two /// indexes (inclusive) that have a higher mod-sequence value than the one /// specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The mod-sequence value. /// The message summary items to fetch. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// -or- /// is empty. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 IList Fetch (int min, int max, ulong modseq, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the messages between the two indexes /// (inclusive) that have a higher mod-sequence value than the one specified. /// /// /// Asynchronously fetches the message summaries for the messages between /// the two indexes (inclusive) that have a higher mod-sequence value than the /// one specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The mod-sequence value. /// The message summary items to fetch. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// -or- /// is empty. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> FetchAsync (int min, int max, ulong modseq, MessageSummaryItems items, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the messages between the two indexes (inclusive) /// that have a higher mod-sequence value than the one specified. /// /// /// Fetches the message summaries for the messages between the two /// indexes (inclusive) that have a higher mod-sequence value than the one /// specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 IList Fetch (int min, int max, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the messages between the two indexes /// (inclusive) that have a higher mod-sequence value than the one specified. /// /// /// Asynchronously fetches the message summaries for the messages between /// the two indexes (inclusive) that have a higher mod-sequence value than the /// one specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> FetchAsync (int min, int max, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Fetch the message summaries for the messages between the two indexes (inclusive) /// that have a higher mod-sequence value than the one specified. /// /// /// Fetches the message summaries for the messages between the two /// indexes (inclusive) that have a higher mod-sequence value than the one /// specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// /// /// is null. /// /// /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 IList Fetch (int min, int max, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously fetch the message summaries for the messages between the two indexes /// (inclusive) that have a higher mod-sequence value than the one specified. /// /// /// Asynchronously fetches the message summaries for the messages between /// the two indexes (inclusive) that have a higher mod-sequence value than the /// one specified. /// It should be noted that if another client has modified any message /// in the folder, the mail service may choose to return information that was /// not explicitly requested. It is therefore important to be prepared to /// handle both additional fields on a for /// messages that were requested as well as summaries for messages that were /// not requested at all. /// /// An enumeration of summaries for the requested messages. /// The minimum index. /// The maximum index, or -1 to specify no upper bound. /// The mod-sequence value. /// The message summary items to fetch. /// The desired header fields. /// The cancellation token. /// /// is out of range. /// -or- /// is out of range. /// /// /// is null. /// /// /// One or more of the specified is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> FetchAsync (int min, int max, ulong modseq, MessageSummaryItems items, IEnumerable headers, CancellationToken cancellationToken = default (CancellationToken)); /// /// Get the specified message headers. /// /// /// Gets the specified message headers. /// /// The message headers. /// The UID of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message headers. /// /// /// 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 HeaderList GetHeaders (UniqueId uid, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get the specified message headers. /// /// /// Asynchronously gets the specified message headers. /// /// The message headers. /// The UID of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message headers. /// /// /// 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 Task GetHeadersAsync (UniqueId uid, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get the specified body part headers. /// /// /// Gets the specified body part headers. /// /// The body part headers. /// The UID of the message. /// The body part. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested body part headers. /// /// /// 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 HeaderList GetHeaders (UniqueId uid, BodyPart part, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get the specified body part headers. /// /// /// Asynchronously gets the specified body part headers. /// /// The body part headers. /// The UID of the message. /// The body part. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested body part headers. /// /// /// 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 Task GetHeadersAsync (UniqueId uid, BodyPart part, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get the specified message headers. /// /// /// Gets the specified message headers. /// /// The message headers. /// The index of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message headers. /// /// /// 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 HeaderList GetHeaders (int index, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get the specified message headers. /// /// /// Asynchronously gets the specified message headers. /// /// The message headers. /// The index of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message headers. /// /// /// 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 Task GetHeadersAsync (int index, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get the specified body part headers. /// /// /// Gets the specified body part headers. /// /// The body part headers. /// The index of the message. /// The body part. /// The cancellation token. /// The progress reporting mechanism. /// /// is out of range. /// /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested body part headers. /// /// /// 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 HeaderList GetHeaders (int index, BodyPart part, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get the specified body part headers. /// /// /// Asynchronously gets the specified body part headers. /// /// The body part headers. /// The index of the message. /// The body part. /// The cancellation token. /// The progress reporting mechanism. /// /// is out of range. /// /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested body part headers. /// /// /// 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 Task GetHeadersAsync (int index, BodyPart part, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get the specified message. /// /// /// Gets the specified message. /// /// The message. /// The UID of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message. /// /// /// 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 MimeMessage GetMessage (UniqueId uid, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get the specified message. /// /// /// Asynchronously gets the specified message. /// /// The message. /// The UID of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message. /// /// /// 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 Task GetMessageAsync (UniqueId uid, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get the specified message. /// /// /// Gets the specified message. /// /// The message. /// The index of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message. /// /// /// 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 MimeMessage GetMessage (int index, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get the specified message. /// /// /// Asynchronously gets the specified message. /// /// The message. /// The index of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message. /// /// /// 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 Task GetMessageAsync (int index, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get the specified body part. /// /// /// Gets the specified body part. /// /// /// /// /// The body part. /// The UID of the message. /// The body part. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message body. /// /// /// 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 MimeEntity GetBodyPart (UniqueId uid, BodyPart part, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get the specified body part. /// /// /// Asynchronously gets the specified body part. /// /// The body part. /// The UID of the message. /// The body part. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message body. /// /// /// 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 Task GetBodyPartAsync (UniqueId uid, BodyPart part, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get the specified body part. /// /// /// Gets the specified body part. /// /// The body part. /// The index of the message. /// The body part. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message body. /// /// /// 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 MimeEntity GetBodyPart (int index, BodyPart part, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get the specified body part. /// /// /// Asynchronously gets the specified body part. /// /// The body part. /// The index of the message. /// The body part. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message body. /// /// /// 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 Task GetBodyPartAsync (int index, BodyPart part, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get a substream of the specified message. /// /// /// Gets a substream of the message. If the starting offset is beyond /// the end of the message, an empty stream is returned. If the number of /// bytes desired extends beyond the end of the message, a truncated stream /// will be returned. /// /// The stream. /// The UID of the message. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Stream GetStream (UniqueId uid, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get a substream of the specified message. /// /// /// Asynchronously gets a substream of the message. If the starting offset is beyond /// the end of the message, an empty stream is returned. If the number of /// bytes desired extends beyond the end of the message, a truncated stream /// will be returned. /// /// The stream. /// The UID of the message. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Task GetStreamAsync (UniqueId uid, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get a substream of the specified message. /// /// /// Gets a substream of the message. If the starting offset is beyond /// the end of the message, an empty stream is returned. If the number of /// bytes desired extends beyond the end of the message, a truncated stream /// will be returned. /// /// The stream. /// The index of the message. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is out of range. /// -or- /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Stream GetStream (int index, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get a substream of the specified message. /// /// /// Asynchronously gets a substream of the message. If the starting offset is beyond /// the end of the message, an empty stream is returned. If the number of /// bytes desired extends beyond the end of the message, a truncated stream /// will be returned. /// /// The stream. /// The index of the message. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is out of range. /// -or- /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Task GetStreamAsync (int index, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get a substream of the specified body part. /// /// /// Gets a substream of the body part. If the starting offset is beyond /// the end of the body part, an empty stream is returned. If the number of /// bytes desired extends beyond the end of the body part, a truncated stream /// will be returned. /// /// The stream. /// The UID of the message. /// The desired body part. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// is null. /// /// /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Stream GetStream (UniqueId uid, BodyPart part, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { if (uid.Id == 0) throw new ArgumentException ("The uid is invalid.", nameof (uid)); if (part == null) throw new ArgumentNullException (nameof (part)); if (offset < 0) throw new ArgumentOutOfRangeException (nameof (offset)); if (count < 0) throw new ArgumentOutOfRangeException (nameof (count)); return GetStream (uid, part.PartSpecifier, offset, count, cancellationToken, progress); } /// /// Asynchronously get a substream of the specified body part. /// /// /// Asynchronously gets a substream of the body part. If the starting offset is beyond /// the end of the body part, an empty stream is returned. If the number of /// bytes desired extends beyond the end of the body part, a truncated stream /// will be returned. /// /// The stream. /// The UID of the message. /// The desired body part. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// is null. /// /// /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task GetStreamAsync (UniqueId uid, BodyPart part, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { if (part == null) throw new ArgumentNullException (nameof (part)); if (offset < 0) throw new ArgumentOutOfRangeException (nameof (offset)); if (count < 0) throw new ArgumentOutOfRangeException (nameof (count)); return GetStreamAsync (uid, part.PartSpecifier, offset, count, cancellationToken, progress); } /// /// Get a substream of the specified body part. /// /// /// Gets a substream of the body part. If the starting offset is beyond /// the end of the body part, an empty stream is returned. If the number of /// bytes desired extends beyond the end of the body part, a truncated stream /// will be returned. /// /// The stream. /// The index of the message. /// The desired body part. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// -or- /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Stream GetStream (int index, BodyPart part, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { if (index < 0 || index >= Count) throw new ArgumentOutOfRangeException (nameof (index)); if (part == null) throw new ArgumentNullException (nameof (part)); if (offset < 0) throw new ArgumentOutOfRangeException (nameof (offset)); if (count < 0) throw new ArgumentOutOfRangeException (nameof (count)); return GetStream (index, part.PartSpecifier, offset, count, cancellationToken, progress); } /// /// Asynchronously get a substream of the specified body part. /// /// /// Asynchronously gets a substream of the body part. If the starting offset is beyond /// the end of the body part, an empty stream is returned. If the number of /// bytes desired extends beyond the end of the body part, a truncated stream /// will be returned. /// /// The stream. /// The index of the message. /// The desired body part. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// -or- /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task GetStreamAsync (int index, BodyPart part, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null) { if (index < 0 || index >= Count) throw new ArgumentOutOfRangeException (nameof (index)); if (part == null) throw new ArgumentNullException (nameof (part)); if (offset < 0) throw new ArgumentOutOfRangeException (nameof (offset)); if (count < 0) throw new ArgumentOutOfRangeException (nameof (count)); return GetStreamAsync (index, part.PartSpecifier, offset, count, cancellationToken, progress); } /// /// Get a substream of the specified message. /// /// /// Gets a substream of the specified message. /// For more information about how to construct the , /// see Section 6.4.5 of RFC3501. /// /// The stream. /// The UID of the message. /// The desired section of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Stream GetStream (UniqueId uid, string section, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get a substream of the specified message. /// /// /// Asynchronously gets a substream of the specified message. /// For more information about how to construct the , /// see Section 6.4.5 of RFC3501. /// /// The stream. /// The UID of the message. /// The desired section of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// is null. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Task GetStreamAsync (UniqueId uid, string section, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get a substream of the specified message. /// /// /// Gets a substream of the specified message. If the starting offset is beyond /// the end of the specified section of the message, an empty stream is returned. If /// the number of bytes desired extends beyond the end of the section, a truncated /// stream will be returned. /// For more information about how to construct the , /// see Section 6.4.5 of RFC3501. /// /// The stream. /// The UID of the message. /// The desired section of the message. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// is null. /// /// /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Stream GetStream (UniqueId uid, string section, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get a substream of the specified message. /// /// /// Asynchronously gets a substream of the specified message. If the starting /// offset is beyond the end of the specified section of the message, an empty stream /// is returned. If the number of bytes desired extends beyond the end of the section, /// a truncated stream will be returned. /// For more information about how to construct the , /// see Section 6.4.5 of RFC3501. /// /// The stream. /// The UID of the message. /// The desired section of the message. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is invalid. /// /// /// is null. /// /// /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Task GetStreamAsync (UniqueId uid, string section, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get a substream of the specified message. /// /// /// Gets a substream of the specified message. /// For more information about how to construct the , /// see Section 6.4.5 of RFC3501. /// /// The stream. /// The index of the message. /// The desired section of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Stream GetStream (int index, string section, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get a substream of the specified body part. /// /// /// Asynchronously gets a substream of the specified message. /// For more information about how to construct the , /// see Section 6.4.5 of RFC3501. /// /// The stream. /// The index of the message. /// The desired section of the message. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Task GetStreamAsync (int index, string section, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Get a substream of the specified message. /// /// /// Gets a substream of the specified message. If the starting offset is beyond /// the end of the specified section of the message, an empty stream is returned. If /// the number of bytes desired extends beyond the end of the section, a truncated /// stream will be returned. /// For more information about how to construct the , /// see Section 6.4.5 of RFC3501. /// /// The stream. /// The index of the message. /// The desired section of the message. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// -or- /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Stream GetStream (int index, string section, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Asynchronously get a substream of the specified body part. /// /// /// Asynchronously gets a substream of the specified message. If the starting /// offset is beyond the end of the specified section of the message, an empty stream /// is returned. If the number of bytes desired extends beyond the end of the section, /// a truncated stream will be returned. /// For more information about how to construct the , /// see Section 6.4.5 of RFC3501. /// /// The stream. /// The index of the message. /// The desired section of the message. /// The starting offset of the first desired byte. /// The number of bytes desired. /// The cancellation token. /// The progress reporting mechanism. /// /// is null. /// /// /// is out of range. /// -or- /// is negative. /// -or- /// is negative. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The did not return the requested message stream. /// /// /// 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 Task GetStreamAsync (int index, string section, int offset, int count, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null); /// /// Add a set of flags to the specified message. /// /// /// Adds a set of flags to the specified message. /// /// The UID of the message. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void AddFlags (UniqueId uid, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { AddFlags (new [] { uid }, flags, silent, cancellationToken); } /// /// Asynchronously add a set of flags to the specified message. /// /// /// Asynchronously adds a set of flags to the specified message. /// /// An asynchronous task context. /// The UID of the message. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task AddFlagsAsync (UniqueId uid, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddFlagsAsync (new [] { uid }, flags, silent, cancellationToken); } /// /// Add a set of flags to the specified message. /// /// /// Adds a set of flags to the specified message. /// /// The UID of the message. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void AddFlags (UniqueId uid, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { AddFlags (new [] { uid }, flags, keywords, silent, cancellationToken); } /// /// Asynchronously add a set of flags to the specified message. /// /// /// Asynchronously adds a set of flags to the specified message. /// /// An asynchronous task context. /// The UID of the message. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task AddFlagsAsync (UniqueId uid, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddFlagsAsync (new [] { uid }, flags, keywords, silent, cancellationToken); } /// /// Add a set of flags to the specified messages. /// /// /// Adds a set of flags to the specified messages. /// /// The UIDs of the messages. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void AddFlags (IList uids, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { AddFlags (uids, flags, null, silent, cancellationToken); } /// /// Asynchronously add a set of flags to the specified messages. /// /// /// Asynchronously adds a set of flags to the specified messages. /// /// An asynchronous task context. /// The UIDs of the messages. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task AddFlagsAsync (IList uids, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddFlagsAsync (uids, flags, null, silent, cancellationToken); } /// /// Add a set of flags to the specified messages. /// /// /// Adds a set of flags to the specified messages. /// /// The UIDs of the messages. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void AddFlags (IList uids, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously add a set of flags to the specified messages. /// /// /// Asynchronously adds a set of flags to the specified messages. /// /// An asynchronous task context. /// The UIDs of the messages. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task AddFlagsAsync (IList uids, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Remove a set of flags from the specified message. /// /// /// Removes a set of flags from the specified message. /// /// The UIDs of the message. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void RemoveFlags (UniqueId uid, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { RemoveFlags (new [] { uid }, flags, silent, cancellationToken); } /// /// Asynchronously remove a set of flags from the specified message. /// /// /// Asynchronously removes a set of flags from the specified message. /// /// An asynchronous task context. /// The UID of the message. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task RemoveFlagsAsync (UniqueId uid, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveFlagsAsync (new [] { uid }, flags, silent, cancellationToken); } /// /// Remove a set of flags from the specified message. /// /// /// Removes a set of flags from the specified message. /// /// The UIDs of the message. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void RemoveFlags (UniqueId uid, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { RemoveFlags (new [] { uid }, flags, keywords, silent, cancellationToken); } /// /// Asynchronously remove a set of flags from the specified message. /// /// /// Asynchronously removes a set of flags from the specified message. /// /// An asynchronous task context. /// The UID of the message. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task RemoveFlagsAsync (UniqueId uid, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveFlagsAsync (new [] { uid }, flags, keywords, silent, cancellationToken); } /// /// Remove a set of flags from the specified messages. /// /// /// Removes a set of flags from the specified messages. /// /// The UIDs of the messages. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void RemoveFlags (IList uids, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { RemoveFlags (uids, flags, null, silent, cancellationToken); } /// /// Asynchronously remove a set of flags from the specified messages. /// /// /// Asynchronously removes a set of flags from the specified messages. /// /// An asynchronous task context. /// The UIDs of the messages. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task RemoveFlagsAsync (IList uids, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveFlagsAsync (uids, flags, null, silent, cancellationToken); } /// /// Remove a set of flags from the specified messages. /// /// /// Removes a set of flags from the specified messages. /// /// The UIDs of the messages. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void RemoveFlags (IList uids, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously remove a set of flags from the specified messages. /// /// /// Asynchronously removes a set of flags from the specified messages. /// /// An asynchronous task context. /// The UIDs of the messages. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task RemoveFlagsAsync (IList uids, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Set the flags of the specified message. /// /// /// Sets the flags of the specified message. /// /// The UIDs of the message. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void SetFlags (UniqueId uid, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { SetFlags (new [] { uid }, flags, silent, cancellationToken); } /// /// Asynchronously set the flags of the specified message. /// /// /// Asynchronously sets the flags of the specified message. /// /// An asynchronous task context. /// The UID of the message. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The folder is not currently open in read-write mode. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task SetFlagsAsync (UniqueId uid, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetFlagsAsync (new [] { uid }, flags, silent, cancellationToken); } /// /// Set the flags of the specified message. /// /// /// Sets the flags of the specified message. /// /// The UIDs of the message. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void SetFlags (UniqueId uid, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { SetFlags (new [] { uid }, flags, keywords, silent, cancellationToken); } /// /// Asynchronously set the flags of the specified message. /// /// /// Asynchronously sets the flags of the specified message. /// /// An asynchronous task context. /// The UID of the message. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task SetFlagsAsync (UniqueId uid, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetFlagsAsync (new [] { uid }, flags, keywords, silent, cancellationToken); } /// /// Set the flags of the specified messages. /// /// /// Sets the flags of the specified messages. /// /// The UIDs of the messages. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void SetFlags (IList uids, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { SetFlags (uids, flags, null, silent, cancellationToken); } /// /// Asynchronously set the flags of the specified messages. /// /// /// Asynchronously sets the flags of the specified messages. /// /// An asynchronous task context. /// The UIDs of the messages. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task SetFlagsAsync (IList uids, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetFlagsAsync (uids, flags, null, silent, cancellationToken); } /// /// Set the flags of the specified messages. /// /// /// Sets the flags of the specified messages. /// /// The UIDs of the messages. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void SetFlags (IList uids, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously set the flags of the specified messages. /// /// /// Asynchronously sets the flags of the specified messages. /// /// An asynchronous task context. /// The UIDs of the messages. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task SetFlagsAsync (IList uids, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Add a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Adds a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IList AddFlags (IList uids, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddFlags (uids, modseq, flags, null, silent, cancellationToken); } /// /// Asynchronously add a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously adds a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> AddFlagsAsync (IList uids, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddFlagsAsync (uids, modseq, flags, null, silent, cancellationToken); } /// /// Add a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Adds a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList AddFlags (IList uids, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously add a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously adds a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> AddFlagsAsync (IList uids, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Remove a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Removes a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IList RemoveFlags (IList uids, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveFlags (uids, modseq, flags, null, silent, cancellationToken); } /// /// Asynchronously remove a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously removes a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> RemoveFlagsAsync (IList uids, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveFlagsAsync (uids, modseq, flags, null, silent, cancellationToken); } /// /// Remove a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Removes a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList RemoveFlags (IList uids, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously remove a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously removes a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> RemoveFlagsAsync (IList uids, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Set the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Sets the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IList SetFlags (IList uids, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetFlags (uids, modseq, flags, null, silent, cancellationToken); } /// /// Asynchronously set the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously sets the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> SetFlagsAsync (IList uids, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetFlagsAsync (uids, modseq, flags, null, silent, cancellationToken); } /// /// Set the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Sets the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList SetFlags (IList uids, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously set the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously sets the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> SetFlagsAsync (IList uids, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Add a set of flags to the specified message. /// /// /// Adds a set of flags to the specified message. /// /// The index of the message. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void AddFlags (int index, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { AddFlags (new [] { index }, flags, silent, cancellationToken); } /// /// Asynchronously add a set of flags to the specified message. /// /// /// Asynchronously adds a set of flags to the specified message. /// /// An asynchronous task context. /// The index of the messages. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task AddFlagsAsync (int index, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddFlagsAsync (new [] { index }, flags, silent, cancellationToken); } /// /// Add a set of flags to the specified message. /// /// /// Adds a set of flags to the specified message. /// /// The index of the message. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void AddFlags (int index, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { AddFlags (new [] { index }, flags, keywords, silent, cancellationToken); } /// /// Asynchronously add a set of flags to the specified message. /// /// /// Asynchronously adds a set of flags to the specified message. /// /// An asynchronous task context. /// The index of the messages. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task AddFlagsAsync (int index, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddFlagsAsync (new [] { index }, flags, keywords, silent, cancellationToken); } /// /// Add a set of flags to the specified messages. /// /// /// Adds a set of flags to the specified messages. /// /// The indexes of the messages. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void AddFlags (IList indexes, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { AddFlags (indexes, flags, null, silent, cancellationToken); } /// /// Asynchronously add a set of flags to the specified messages. /// /// /// Asynchronously adds a set of flags to the specified messages. /// /// An asynchronous task context. /// The indexes of the messages. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task AddFlagsAsync (IList indexes, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddFlagsAsync (indexes, flags, null, silent, cancellationToken); } /// /// Add a set of flags to the specified messages. /// /// /// Adds a set of flags to the specified messages. /// /// The indexes of the messages. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void AddFlags (IList indexes, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously add a set of flags to the specified messages. /// /// /// Asynchronously adds a set of flags to the specified messages. /// /// An asynchronous task context. /// The indexes of the messages. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task AddFlagsAsync (IList indexes, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Remove a set of flags from the specified message. /// /// /// Removes a set of flags from the specified message. /// /// The index of the message. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void RemoveFlags (int index, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { RemoveFlags (new [] { index }, flags, silent, cancellationToken); } /// /// Asynchronously remove a set of flags from the specified message. /// /// /// Asynchronously removes a set of flags from the specified message. /// /// An asynchronous task context. /// The index of the message. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task RemoveFlagsAsync (int index, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveFlagsAsync (new [] { index }, flags, silent, cancellationToken); } /// /// Remove a set of flags from the specified message. /// /// /// Removes a set of flags from the specified message. /// /// The index of the message. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void RemoveFlags (int index, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { RemoveFlags (new [] { index }, flags, keywords, silent, cancellationToken); } /// /// Asynchronously remove a set of flags from the specified message. /// /// /// Asynchronously removes a set of flags from the specified message. /// /// An asynchronous task context. /// The index of the message. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task RemoveFlagsAsync (int index, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveFlagsAsync (new [] { index }, flags, keywords, silent, cancellationToken); } /// /// Remove a set of flags from the specified messages. /// /// /// Removes a set of flags from the specified messages. /// /// The indexes of the messages. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void RemoveFlags (IList indexes, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { RemoveFlags (indexes, flags, null, silent, cancellationToken); } /// /// Asynchronously remove a set of flags from the specified messages. /// /// /// Asynchronously removes a set of flags from the specified messages. /// /// An asynchronous task context. /// The indexes of the messages. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task RemoveFlagsAsync (IList indexes, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveFlagsAsync (indexes, flags, null, silent, cancellationToken); } /// /// Remove a set of flags from the specified messages. /// /// /// Removes a set of flags from the specified messages. /// /// The indexes of the messages. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void RemoveFlags (IList indexes, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously remove a set of flags from the specified messages. /// /// /// Asynchronously removes a set of flags from the specified messages. /// /// An asynchronous task context. /// The indexes of the messages. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task RemoveFlagsAsync (IList indexes, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Set the flags of the specified message. /// /// /// Sets the flags of the specified message. /// /// The index of the message. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void SetFlags (int index, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { SetFlags (new [] { index }, flags, silent, cancellationToken); } /// /// Asynchronously set the flags of the specified message. /// /// /// Asynchronously sets the flags of the specified message. /// /// An asynchronous task context. /// The index of the message. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task SetFlagsAsync (int index, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetFlagsAsync (new [] { index }, flags, silent, cancellationToken); } /// /// Set the flags of the specified message. /// /// /// Sets the flags of the specified message. /// /// The index of the message. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void SetFlags (int index, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { SetFlags (new [] { index }, flags, keywords, silent, cancellationToken); } /// /// Asynchronously set the flags of the specified message. /// /// /// Asynchronously sets the flags of the specified message. /// /// An asynchronous task context. /// The index of the message. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task SetFlagsAsync (int index, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetFlagsAsync (new [] { index }, flags, keywords, silent, cancellationToken); } /// /// Set the flags of the specified messages. /// /// /// Sets the flags of the specified messages. /// /// The indexes of the messages. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void SetFlags (IList indexes, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { SetFlags (indexes, flags, null, silent, cancellationToken); } /// /// Asynchronously set the flags of the specified messages. /// /// /// Asynchronously sets the flags of the specified messages. /// /// An asynchronous task context. /// The indexes of the messages. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task SetFlagsAsync (IList indexes, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetFlagsAsync (indexes, flags, null, silent, cancellationToken); } /// /// Set the flags of the specified messages. /// /// /// Sets the flags of the specified messages. /// /// The indexes of the messages. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void SetFlags (IList indexes, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously set the flags of the specified messages. /// /// /// Asynchronously sets the flags of the specified messages. /// /// An asynchronous task context. /// The indexes of the messages. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task SetFlagsAsync (IList indexes, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Add a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Adds a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IList AddFlags (IList indexes, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddFlags (indexes, modseq, flags, null, silent, cancellationToken); } /// /// Asynchronously add a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously adds a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> AddFlagsAsync (IList indexes, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddFlagsAsync (indexes, modseq, flags, null, silent, cancellationToken); } /// /// Add a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Adds a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList AddFlags (IList indexes, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously add a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously adds a set of flags to the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to add. /// A set of user-defined flags to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> AddFlagsAsync (IList indexes, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Remove a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Removes a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IList RemoveFlags (IList indexes, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveFlags (indexes, modseq, flags, null, silent, cancellationToken); } /// /// Asynchronously remove a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously removes a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> RemoveFlagsAsync (IList indexes, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveFlagsAsync (indexes, modseq, flags, null, silent, cancellationToken); } /// /// Remove a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Removes a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList RemoveFlags (IList indexes, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously remove a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously removes a set of flags from the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to remove. /// A set of user-defined flags to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// -or- /// No flags were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> RemoveFlagsAsync (IList indexes, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Set the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Sets the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IList SetFlags (IList indexes, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetFlags (indexes, modseq, flags, null, silent, cancellationToken); } /// /// Asynchronously set the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously sets the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> SetFlagsAsync (IList indexes, ulong modseq, MessageFlags flags, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetFlagsAsync (indexes, modseq, flags, null, silent, cancellationToken); } /// /// Set the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Sets the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList SetFlags (IList indexes, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously set the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously sets the flags of the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The message flags to set. /// A set of user-defined flags to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> SetFlagsAsync (IList indexes, ulong modseq, MessageFlags flags, HashSet keywords, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Add a set of labels to the specified message. /// /// /// Adds a set of labels to the specified message. /// /// The UID of the message. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void AddLabels (UniqueId uid, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { AddLabels (new [] { uid }, labels, silent, cancellationToken); } /// /// Asynchronously add a set of labels to the specified message. /// /// /// Asynchronously adds a set of labels to the specified message. /// /// An asynchronous task context. /// The UID of the message. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task AddLabelsAsync (UniqueId uid, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddLabelsAsync (new [] { uid }, labels, silent, cancellationToken); } /// /// Add a set of labels to the specified messages. /// /// /// Adds a set of labels to the specified messages. /// /// The UIDs of the messages. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void AddLabels (IList uids, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously add a set of labels to the specified messages. /// /// /// Asynchronously adds a set of labels to the specified messages. /// /// An asynchronous task context. /// The UIDs of the messages. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task AddLabelsAsync (IList uids, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Remove a set of labels from the specified message. /// /// /// Removes a set of labels from the specified message. /// /// The UIDs of the message. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void RemoveLabels (UniqueId uid, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { RemoveLabels (new [] { uid }, labels, silent, cancellationToken); } /// /// Asynchronously remove a set of labels from the specified message. /// /// /// Asynchronously removes a set of labels from the specified message. /// /// An asynchronous task context. /// The UID of the message. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task RemoveLabelsAsync (UniqueId uid, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveLabelsAsync (new [] { uid }, labels, silent, cancellationToken); } /// /// Remove a set of labels from the specified messages. /// /// /// Removes a set of labels from the specified messages. /// /// The UIDs of the messages. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void RemoveLabels (IList uids, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously remove a set of labels from the specified messages. /// /// /// Asynchronously removes a set of labels from the specified messages. /// /// An asynchronous task context. /// The UIDs of the messages. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task RemoveLabelsAsync (IList uids, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Set the labels of the specified message. /// /// /// Sets the labels of the specified message. /// /// The UIDs of the message. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void SetLabels (UniqueId uid, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { SetLabels (new [] { uid }, labels, silent, cancellationToken); } /// /// Asynchronously set the labels of the specified message. /// /// /// Asynchronously sets the labels of the specified message. /// /// An asynchronous task context. /// The UID of the message. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task SetLabelsAsync (UniqueId uid, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetLabelsAsync (new [] { uid }, labels, silent, cancellationToken); } /// /// Set the labels of the specified messages. /// /// /// Sets the labels of the specified messages. /// /// The UIDs of the messages. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void SetLabels (IList uids, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously set the labels of the specified messages. /// /// /// Asynchronously sets the labels of the specified messages. /// /// An asynchronous task context. /// The UIDs of the messages. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task SetLabelsAsync (IList uids, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Add a set of labels to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Adds a set of labels to the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList AddLabels (IList uids, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously add a set of labels to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously adds a set of labels to the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> AddLabelsAsync (IList uids, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Remove a set of labels from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Removes a set of labels from the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList RemoveLabels (IList uids, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously remove a set of labels from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously removes a set of labels from the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> RemoveLabelsAsync (IList uids, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Set the labels of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Sets the labels of the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList SetLabels (IList uids, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously set the labels of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously sets the labels of the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> SetLabelsAsync (IList uids, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Add a set of labels to the specified message. /// /// /// Adds a set of labels to the specified message. /// /// The index of the message. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void AddLabels (int index, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { AddLabels (new [] { index }, labels, silent, cancellationToken); } /// /// Asynchronously add a set of labels to the specified message. /// /// /// Asynchronously adds a set of labels to the specified message. /// /// An asynchronous task context. /// The index of the messages. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task AddLabelsAsync (int index, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return AddLabelsAsync (new [] { index }, labels, silent, cancellationToken); } /// /// Add a set of labels to the specified messages. /// /// /// Adds a set of labels to the specified messages. /// /// The indexes of the messages. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void AddLabels (IList indexes, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously add a set of labels to the specified messages. /// /// /// Asynchronously adds a set of labels to the specified messages. /// /// An asynchronous task context. /// The indexes of the messages. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task AddLabelsAsync (IList indexes, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Remove a set of labels from the specified message. /// /// /// Removes a set of labels from the specified message. /// /// The index of the message. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void RemoveLabels (int index, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { RemoveLabels (new [] { index }, labels, silent, cancellationToken); } /// /// Asynchronously remove a set of labels from the specified message. /// /// /// Asynchronously removes a set of labels from the specified message. /// /// An asynchronous task context. /// The index of the message. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task RemoveLabelsAsync (int index, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return RemoveLabelsAsync (new [] { index }, labels, silent, cancellationToken); } /// /// Remove a set of labels from the specified messages. /// /// /// Removes a set of labels from the specified messages. /// /// The indexes of the messages. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void RemoveLabels (IList indexes, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously remove a set of labels from the specified messages. /// /// /// Asynchronously removes a set of labels from the specified messages. /// /// An asynchronous task context. /// The indexes of the messages. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task RemoveLabelsAsync (IList indexes, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Set the labels of the specified message. /// /// /// Sets the labels of the specified message. /// /// The index of the message. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void SetLabels (int index, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { SetLabels (new [] { index }, labels, silent, cancellationToken); } /// /// Asynchronously set the labels of the specified message. /// /// /// Asynchronously sets the labels of the specified message. /// /// An asynchronous task context. /// The index of the message. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task SetLabelsAsync (int index, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)) { return SetLabelsAsync (new [] { index }, labels, silent, cancellationToken); } /// /// Set the labels of the specified messages. /// /// /// Sets the labels of the specified messages. /// /// The indexes of the messages. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 void SetLabels (IList indexes, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously set the labels of the specified messages. /// /// /// Asynchronously sets the labels of the specified messages. /// /// An asynchronous task context. /// The indexes of the messages. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// 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 Task SetLabelsAsync (IList indexes, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Add a set of labels to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Adds a set of labels to the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList AddLabels (IList indexes, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously add a set of labels to the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously adds a set of labels to the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The labels to add. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> AddLabelsAsync (IList indexes, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Remove a set of labels from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Removes a set of labels from the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList RemoveLabels (IList indexes, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously remove a set of labels from the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously removes a set of labels from the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The labels to remove. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// -or- /// No labels were specified. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> RemoveLabelsAsync (IList indexes, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Set the labels of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Sets the labels of the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 IList SetLabels (IList indexes, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously set the labels of the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously sets the labels of the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The labels to set. /// If set to true, no events will be emitted. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open in read-write mode. /// /// /// The does not support mod-sequences. /// /// /// 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 Task> SetLabelsAsync (IList indexes, ulong modseq, IList labels, bool silent, CancellationToken cancellationToken = default (CancellationToken)); /// /// Store the annotations for the specified message. /// /// /// Stores the annotations for the specified message. /// /// The UID of the message. /// The annotations to store. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void Store (UniqueId uid, IList annotations, CancellationToken cancellationToken = default (CancellationToken)) { Store (new [] { uid }, annotations, cancellationToken); } /// /// Asynchronously store the annotations for the specified message. /// /// /// Asynchronously stores the annotations for the specified message. /// /// An asynchronous task context. /// The UID of the message. /// The annotations to store. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task StoreAsync (UniqueId uid, IList annotations, CancellationToken cancellationToken = default (CancellationToken)) { return StoreAsync (new [] { uid }, annotations, cancellationToken); } /// /// Store the annotations for the specified messages. /// /// /// Stores the annotations for the specified messages. /// /// The UIDs of the messages. /// The annotations to store. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// /// /// 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 void Store (IList uids, IList annotations, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously store the annotations for the specified messages. /// /// /// Asynchronously stores the annotations for the specified messages. /// /// An asynchronous task context. /// The UIDs of the messages. /// The annotations to store. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// /// /// 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 Task StoreAsync (IList uids, IList annotations, CancellationToken cancellationToken = default (CancellationToken)); /// /// Store the annotations for the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Stores the annotations for the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The annotations to store. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// -or- /// The does not support mod-sequences. /// /// /// 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 IList Store (IList uids, ulong modseq, IList annotations, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously store the annotations for the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously stores the annotations for the specified messages only if their mod-sequence value is less than the specified value. /// /// The unique IDs of the messages that were not updated. /// The UIDs of the messages. /// The mod-sequence value. /// The annotations to store. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// -or- /// The does not support mod-sequences. /// /// /// 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 Task> StoreAsync (IList uids, ulong modseq, IList annotations, CancellationToken cancellationToken = default (CancellationToken)); /// /// Store the annotations for the specified message. /// /// /// Stores the annotations for the specified message. /// /// The index of the message. /// The annotations to store. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual void Store (int index, IList annotations, CancellationToken cancellationToken = default (CancellationToken)) { Store (new[] { index }, annotations, cancellationToken); } /// /// Asynchronously store the annotations for the specified message. /// /// /// Asynchronously stores the annotations for the specified message. /// /// An asynchronous task context. /// The indexes of the message. /// The annotations to store. /// The cancellation token. /// /// is null. /// /// /// is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task StoreAsync (int index, IList annotations, CancellationToken cancellationToken = default (CancellationToken)) { return StoreAsync (new [] { index }, annotations, cancellationToken); } /// /// Store the annotations for the specified messages. /// /// /// Stores the annotations for the specified messages. /// /// The indexes of the messages. /// The annotations to store. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// /// /// 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 void Store (IList indexes, IList annotations, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously store the annotations for the specified messages. /// /// /// Asynchronously stores the annotations for the specified messages. /// /// An asynchronous task context. /// The indexes of the messages. /// The annotations to store. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// /// /// 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 Task StoreAsync (IList indexes, IList annotations, CancellationToken cancellationToken = default (CancellationToken)); /// /// Store the annotations for the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Stores the annotations for the specified messages only if their mod-sequence value is less than the specified value. /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The annotations to store. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// -or- /// The does not support mod-sequences. /// /// /// 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 IList Store (IList indexes, ulong modseq, IList annotations, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously store the annotations for the specified messages only if their mod-sequence value is less than the specified value. /// /// /// Asynchronously stores the annotations for the specified messages only if their mod-sequence value is less than the specified value.s /// /// The indexes of the messages that were not updated. /// The indexes of the messages. /// The mod-sequence value. /// The annotations to store. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// One or more of the is invalid. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open in read-write mode. /// /// /// Cannot store annotations without any properties defined. /// /// /// The does not support annotations. /// -or- /// The does not support mod-sequences. /// /// /// 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 Task> StoreAsync (IList indexes, ulong modseq, IList annotations, CancellationToken cancellationToken = default (CancellationToken)); /// /// Search the folder for messages matching the specified query. /// /// /// The returned array of unique identifiers can be used with methods such as /// . /// /// An array of matching UIDs. /// The search query. /// The cancellation token. /// /// is null. /// /// /// One or more search terms in the are not supported by the mail store. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Search (SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously search the folder for messages matching the specified query. /// /// /// The returned array of unique identifiers can be used with methods such as /// . /// /// An array of matching UIDs. /// The search query. /// The cancellation token. /// /// is null. /// /// /// One or more search terms in the are not supported by the mail store. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> SearchAsync (SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)) { if (query == null) throw new ArgumentNullException (nameof (query)); return Task.Factory.StartNew (() => { lock (SyncRoot) { return Search (query, cancellationToken); } }, cancellationToken, TaskCreationOptions.None, TaskScheduler.Default); } /// /// Search the subset of UIDs in the folder for messages matching the specified query. /// /// /// The returned array of unique identifiers can be used with methods such as /// . /// /// An array of matching UIDs in the specified sort order. /// The subset of UIDs /// The search query. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// is empty. /// -or- /// One or more of the is invalid. /// /// /// One or more search terms in the are not supported by the mail store. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IList Search (IList uids, SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)) { var uidSet = new UidSearchQuery (uids); if (query == null) throw new ArgumentNullException (nameof (query)); return Search (uidSet.And (query), cancellationToken); } /// /// Asynchronously search the subset of UIDs in the folder for messages matching the specified query. /// /// /// The returned array of unique identifiers can be used with methods such as /// . /// /// An array of matching UIDs in the specified sort order. /// The subset of UIDs /// The search query. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// is empty. /// -or- /// One or more of the is invalid. /// /// /// One or more search terms in the are not supported. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> SearchAsync (IList uids, SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)) { var uidSet = new UidSearchQuery (uids); if (query == null) throw new ArgumentNullException (nameof (query)); return SearchAsync (uidSet.And (query), cancellationToken); } /// /// Search the folder for messages matching the specified query. /// /// /// Searches the folder for messages matching the specified query, /// returning only the specified search results. /// /// The search results. /// The search options. /// The search query. /// The cancellation token. /// /// is null. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support the specified search options. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open. /// /// /// 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 SearchResults Search (SearchOptions options, SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously search the folder for messages matching the specified query. /// /// /// Asynchronously searches the folder for messages matching the specified query, /// returning only the specified search results. /// /// The search results. /// The search options. /// The search query. /// The cancellation token. /// /// is null. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support the specified search options. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open. /// /// /// 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 Task SearchAsync (SearchOptions options, SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)); /// /// Search the subset of UIDs in the folder for messages matching the specified query. /// /// /// Searches the fsubset of UIDs in the folder for messages matching the specified query, /// returning only the specified search results. /// /// The search results. /// The search options. /// The subset of UIDs /// The search query. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// is empty. /// -or- /// One or more of the is invalid. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support the specified search options. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual SearchResults Search (SearchOptions options, IList uids, SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)) { var uidSet = new UidSearchQuery (uids); if (query == null) throw new ArgumentNullException (nameof (query)); return Search (options, uidSet.And (query), cancellationToken); } /// /// Asynchronously search the subset of UIDs in the folder for messages matching the specified query. /// /// /// Asynchronously searches the fsubset of UIDs in the folder for messages matching the specified query, /// returning only the specified search results. /// /// The search results. /// The search options. /// The subset of UIDs /// The search query. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// is empty. /// -or- /// One or more of the is invalid. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support the specified search options. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task SearchAsync (SearchOptions options, IList uids, SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)) { var uidSet = new UidSearchQuery (uids); if (query == null) throw new ArgumentNullException (nameof (query)); return SearchAsync (options, uidSet.And (query), cancellationToken); } /// /// Sort messages matching the specified query. /// /// /// The returned array of unique identifiers will be sorted in the preferred order and /// can be used with . /// /// /// An array of matching UIDs in the specified sort order. /// The search query. /// The sort order. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// is empty. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support sorting search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Sort (SearchQuery query, IList orderBy, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously sort messages matching the specified query. /// /// /// The returned array of unique identifiers will be sorted in the preferred order and /// can be used with . /// /// An array of matching UIDs in the specified sort order. /// The search query. /// The sort order. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// is empty. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support sorting search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> SortAsync (SearchQuery query, IList orderBy, CancellationToken cancellationToken = default (CancellationToken)); /// /// Sort messages matching the specified query. /// /// /// The returned array of unique identifiers will be sorted in the preferred order and /// can be used with . /// /// An array of matching UIDs in the specified sort order. /// The subset of UIDs /// The search query. /// The sort order. /// The cancellation token. /// /// is null. /// -or- /// is null. /// -or- /// is null. /// /// /// is empty. /// -or- /// One or more of the is invalid. /// -or- /// is empty. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support sorting search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual IList Sort (IList uids, SearchQuery query, IList orderBy, CancellationToken cancellationToken = default (CancellationToken)) { var uidSet = new UidSearchQuery (uids); if (query == null) throw new ArgumentNullException (nameof (query)); return Sort (uidSet.And (query), orderBy, cancellationToken); } /// /// Asynchronously sort messages matching the specified query. /// /// /// The returned array of unique identifiers will be sorted in the preferred order and /// can be used with . /// /// An array of matching UIDs in the specified sort order. /// The subset of UIDs /// The search query. /// The sort order. /// The cancellation token. /// /// is null. /// -or- /// is null. /// -or- /// is null. /// /// /// is empty. /// -or- /// One or more of the is invalid. /// -or- /// is empty. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support sorting search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task> SortAsync (IList uids, SearchQuery query, IList orderBy, CancellationToken cancellationToken = default (CancellationToken)) { var uidSet = new UidSearchQuery (uids); if (query == null) throw new ArgumentNullException (nameof (query)); return SortAsync (uidSet.And (query), orderBy, cancellationToken); } /// /// Sort messages matching the specified query. /// /// /// Searches the folder for messages matching the specified query, returning the search results in the specified sort order. /// /// The search results. /// The search options. /// The search query. /// The sort order. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// is empty. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support the specified search options. /// -or- /// The server does not support sorting search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open. /// /// /// 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 SearchResults Sort (SearchOptions options, SearchQuery query, IList orderBy, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously sort messages matching the specified query. /// /// /// Asynchronously searches the folder for messages matching the specified query, returning the search results in the specified sort order. /// /// The search results. /// The search options. /// The search query. /// The sort order. /// The cancellation token. /// /// is null. /// -or- /// is null. /// /// /// is empty. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support the specified search options. /// -or- /// The server does not support sorting search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The is not currently open. /// /// /// 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 Task SortAsync (SearchOptions options, SearchQuery query, IList orderBy, CancellationToken cancellationToken = default (CancellationToken)); /// /// Sort messages matching the specified query. /// /// /// Searches the folder for messages matching the specified query, returning the search results in the specified sort order. /// /// The search results. /// The search options. /// The subset of UIDs /// The search query. /// The sort order. /// The cancellation token. /// /// is null. /// -or- /// is null. /// -or- /// is null. /// /// /// is empty. /// -or- /// One or more of the is invalid. /// -or- /// is empty. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support the specified search options. /// -or- /// The server does not support sorting search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual SearchResults Sort (SearchOptions options, IList uids, SearchQuery query, IList orderBy, CancellationToken cancellationToken = default (CancellationToken)) { var uidSet = new UidSearchQuery (uids); if (query == null) throw new ArgumentNullException (nameof (query)); return Sort (options, uidSet.And (query), orderBy, cancellationToken); } /// /// Asynchronously sort messages matching the specified query, returning the search results in the specified sort order. /// /// /// Asynchronously searches the folder for messages matching the specified query, /// returning the search results in the specified sort order. /// /// The search results. /// The search options. /// The subset of UIDs /// The search query. /// The sort order. /// The cancellation token. /// /// is null. /// -or- /// is null. /// -or- /// is null. /// /// /// is empty. /// -or- /// One or more of the is invalid. /// -or- /// is empty. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support the specified search options. /// -or- /// The server does not support sorting search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// The operation was canceled via the cancellation token. /// /// /// An I/O error occurred. /// /// /// The server's response contained unexpected tokens. /// /// /// The command failed. /// public virtual Task SortAsync (SearchOptions options, IList uids, SearchQuery query, IList orderBy, CancellationToken cancellationToken = default (CancellationToken)) { var uidSet = new UidSearchQuery (uids); if (query == null) throw new ArgumentNullException (nameof (query)); return SortAsync (options, uidSet.And (query), orderBy, cancellationToken); } /// /// Thread the messages in the folder that match the search query using the specified threading algorithm. /// /// /// The can be used with methods such as /// . /// /// An array of message threads. /// The threading algorithm to use. /// The search query. /// The cancellation token. /// /// is not supported. /// /// /// is null. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support threading search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Thread (ThreadingAlgorithm algorithm, SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously thread the messages in the folder that match the search query using the specified threading algorithm. /// /// /// The can be used with methods such as /// . /// /// An array of message threads. /// The threading algorithm to use. /// The search query. /// The cancellation token. /// /// is not supported. /// /// /// is null. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support threading search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> ThreadAsync (ThreadingAlgorithm algorithm, SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)); /// /// Thread the messages in the folder that match the search query using the specified threading algorithm. /// /// /// The can be used with methods such as /// . /// /// An array of message threads. /// The subset of UIDs /// The threading algorithm to use. /// The search query. /// The cancellation token. /// /// is not supported. /// /// /// is null. /// -or- /// is null. /// /// /// is empty. /// -or- /// One or more of the is invalid. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support threading search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 IList Thread (IList uids, ThreadingAlgorithm algorithm, SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)); /// /// Asynchronously thread the messages in the folder that match the search query using the specified threading algorithm. /// /// /// The can be used with methods such as /// . /// /// An array of message threads. /// The subset of UIDs /// The threading algorithm to use. /// The search query. /// The cancellation token. /// /// is not supported. /// /// /// is null. /// -or- /// is null. /// /// /// is empty. /// -or- /// One or more of the is invalid. /// /// /// One or more search terms in the are not supported. /// -or- /// The server does not support threading search results. /// /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// /// /// 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 Task> ThreadAsync (IList uids, ThreadingAlgorithm algorithm, SearchQuery query, CancellationToken cancellationToken = default (CancellationToken)); /// /// Occurs when the folder is opened. /// /// /// The event is emitted when the folder is opened. /// public event EventHandler Opened; /// /// Raise the opened event. /// /// /// Raises the opened event. /// protected virtual void OnOpened () { Opened?.Invoke (this, EventArgs.Empty); } /// /// Occurs when the folder is closed. /// /// /// The event is emitted when the folder is closed. /// public event EventHandler Closed; /// /// Raise the closed event. /// /// /// Raises the closed event. /// internal protected virtual void OnClosed () { PermanentFlags = MessageFlags.None; AcceptedFlags = MessageFlags.None; Access = FolderAccess.None; AnnotationAccess = AnnotationAccess.None; AnnotationScopes = AnnotationScope.None; MaxAnnotationSize = 0; Closed?.Invoke (this, EventArgs.Empty); } /// /// Occurs when the folder is deleted. /// /// /// The event is emitted when the folder is deleted. /// public event EventHandler Deleted; /// /// Raise the deleted event. /// /// /// Raises the deleted event. /// protected virtual void OnDeleted () { Deleted?.Invoke (this, EventArgs.Empty); } /// /// Occurs when the folder is renamed. /// /// /// The event is emitted when the folder is renamed. /// public event EventHandler Renamed; /// /// Raise the renamed event. /// /// /// Raises the renamed event. /// /// The old name of the folder. /// The new name of the folder. protected virtual void OnRenamed (string oldName, string newName) { Renamed?.Invoke (this, new FolderRenamedEventArgs (oldName, newName)); } /// /// Notifies the folder that a parent folder has been renamed. /// /// /// implementations should override this method /// to update their state (such as updating their /// property). /// protected virtual void OnParentFolderRenamed () { } void OnParentFolderRenamed (object sender, FolderRenamedEventArgs e) { var oldFullName = FullName; OnParentFolderRenamed (); if (FullName != oldFullName) OnRenamed (oldFullName, FullName); } /// /// Occurs when the folder is subscribed. /// /// /// The event is emitted when the folder is subscribed. /// public event EventHandler Subscribed; /// /// Raise the subscribed event. /// /// /// Raises the subscribed event. /// protected virtual void OnSubscribed () { Subscribed?.Invoke (this, EventArgs.Empty); } /// /// Occurs when the folder is unsubscribed. /// /// /// The event is emitted when the folder is unsubscribed. /// public event EventHandler Unsubscribed; /// /// Raise the unsubscribed event. /// /// /// Raises the unsubscribed event. /// protected virtual void OnUnsubscribed () { Unsubscribed?.Invoke (this, EventArgs.Empty); } /// /// Occurs when a message is expunged from the folder. /// /// /// The event is emitted when a message is expunged from the folder. /// /// /// /// public event EventHandler MessageExpunged; /// /// Raise the message expunged event. /// /// /// Raises the message expunged event. /// /// The message expunged event args. protected virtual void OnMessageExpunged (MessageEventArgs args) { MessageExpunged?.Invoke (this, args); } /// /// Occurs when a message vanishes from the folder. /// /// /// The event is emitted when messages vanish from the folder. /// public event EventHandler MessagesVanished; /// /// Raise the messages vanished event. /// /// /// Raises the messages vanished event. /// /// The messages vanished event args. protected virtual void OnMessagesVanished (MessagesVanishedEventArgs args) { MessagesVanished?.Invoke (this, args); } /// /// Occurs when flags changed on a message. /// /// /// The event is emitted when the flags for a message are changed. /// /// /// /// public event EventHandler MessageFlagsChanged; /// /// Raise the message flags changed event. /// /// /// Raises the message flags changed event. /// /// The message flags changed event args. protected virtual void OnMessageFlagsChanged (MessageFlagsChangedEventArgs args) { MessageFlagsChanged?.Invoke (this, args); } /// /// Occurs when labels changed on a message. /// /// /// The event is emitted when the labels for a message are changed. /// public event EventHandler MessageLabelsChanged; /// /// Raise the message labels changed event. /// /// /// Raises the message labels changed event. /// /// The message labels changed event args. protected virtual void OnMessageLabelsChanged (MessageLabelsChangedEventArgs args) { MessageLabelsChanged?.Invoke (this, args); } /// /// Occurs when annotations changed on a message. /// /// /// The event is emitted when the annotations for a message are changed. /// public event EventHandler AnnotationsChanged; /// /// Raise the message annotations changed event. /// /// /// Raises the message annotations changed event. /// /// The message annotations changed event args. protected virtual void OnAnnotationsChanged (AnnotationsChangedEventArgs args) { AnnotationsChanged?.Invoke (this, args); } /// /// Occurs when a message summary is fetched from the folder. /// /// /// Emitted when a message summary is fetched from the folder. /// When multiple message summaries are being fetched from a remote folder, /// it is possible that the connection will drop or some other exception will /// occur, causing the Fetch method to fail and lose all of the data that has been /// downloaded up to that point, requiring the client to request the same set of /// message summaries all over again after it reconnects. This is obviously /// inefficient. To alleviate this potential problem, this event will be emitted /// as soon as the successfully parses each untagged FETCH /// response from the server, allowing the client to commit this data immediately to /// its local cache. /// Depending on the IMAP server, it is possible that the /// event will be emitted for the same message /// multiple times if the IMAP server happens to split the requested fields into /// multiple untagged FETCH responses. Use the /// property to determine which f properties have /// been populated. /// public event EventHandler MessageSummaryFetched; /// /// Raise the message summary fetched event. /// /// /// Raises the message summary fetched event. /// When multiple message summaries are being fetched from a remote folder, /// it is possible that the connection will drop or some other exception will /// occur, causing the Fetch method to fail and lose all of the data that has been /// downloaded up to that point, requiring the client to request the same set of /// message summaries all over again after it reconnects. This is obviously /// inefficient. To alleviate this potential problem, this event will be emitted /// as soon as the successfully parses each untagged FETCH /// response from the server, allowing the client to commit this data immediately to /// its local cache. /// Depending on the IMAP server, it is possible that /// will be invoked for the same message /// multiple times if the IMAP server happens to split the requested fields into /// multiple untagged FETCH responses. Use the /// property to determine which f properties have /// been populated. /// /// The message summary. protected virtual void OnMessageSummaryFetched (IMessageSummary message) { MessageSummaryFetched?.Invoke (this, new MessageSummaryFetchedEventArgs (message)); } /// /// Occurs when metadata changes. /// /// /// The event is emitted when metadata changes. /// public event EventHandler MetadataChanged; /// /// Raise the metadata changed event. /// /// /// Raises the metadata changed event. /// /// The metadata that changed. internal protected virtual void OnMetadataChanged (Metadata metadata) { MetadataChanged?.Invoke (this, new MetadataChangedEventArgs (metadata)); } /// /// Occurs when the mod-sequence changed on a message. /// /// /// The event is emitted when the mod-sequence for a message is changed. /// public event EventHandler ModSeqChanged; /// /// Raise the message mod-sequence changed event. /// /// /// Raises the message mod-sequence changed event. /// /// The mod-sequence changed event args. protected virtual void OnModSeqChanged (ModSeqChangedEventArgs args) { ModSeqChanged?.Invoke (this, args); } /// /// Occurs when the highest mod-sequence changes. /// /// /// The event is emitted whenever the value changes. /// public event EventHandler HighestModSeqChanged; /// /// Raise the highest mod-sequence changed event. /// /// /// Raises the highest mod-sequence changed event. /// protected virtual void OnHighestModSeqChanged () { HighestModSeqChanged?.Invoke (this, EventArgs.Empty); } /// /// Occurs when the next UID changes. /// /// /// The event is emitted whenever the value changes. /// public event EventHandler UidNextChanged; /// /// Raise the next UID changed event. /// /// /// Raises the next UID changed event. /// protected virtual void OnUidNextChanged () { UidNextChanged?.Invoke (this, EventArgs.Empty); } /// /// Occurs when the UID validity changes. /// /// /// The event is emitted whenever the value changes. /// public event EventHandler UidValidityChanged; /// /// Raise the uid validity changed event. /// /// /// Raises the uid validity changed event. /// protected virtual void OnUidValidityChanged () { UidValidityChanged?.Invoke (this, EventArgs.Empty); } /// /// Occurs when the folder ID changes. /// /// /// The event is emitted whenever the value changes. /// public event EventHandler IdChanged; /// /// Raise the ID changed event. /// /// /// Raises the ID changed event. /// protected virtual void OnIdChanged () { IdChanged?.Invoke (this, EventArgs.Empty); } /// /// Occurs when the folder size changes. /// /// /// The event is emitted whenever the value changes. /// public event EventHandler SizeChanged; /// /// Raise the size changed event. /// /// /// Raises the size changed event. /// protected virtual void OnSizeChanged () { SizeChanged?.Invoke (this, EventArgs.Empty); } /// /// Occurs when the message count changes. /// /// /// The event is emitted whenever the value changes. /// /// /// /// public event EventHandler CountChanged; /// /// Raise the message count changed event. /// /// /// Raises the message count changed event. /// protected virtual void OnCountChanged () { CountChanged?.Invoke (this, EventArgs.Empty); } /// /// Occurs when the recent message count changes. /// /// /// The event is emitted whenever the value changes. /// public event EventHandler RecentChanged; /// /// Raise the recent message count changed event. /// /// /// Raises the recent message count changed event. /// protected virtual void OnRecentChanged () { RecentChanged?.Invoke (this, EventArgs.Empty); } /// /// Occurs when the unread message count changes. /// /// /// The event is emitted whenever the value changes. /// public event EventHandler UnreadChanged; /// /// Raise the unread message count changed event. /// /// /// Raises the unread message count changed event. /// protected virtual void OnUnreadChanged () { UnreadChanged?.Invoke (this, EventArgs.Empty); } #region IEnumerable implementation /// /// Get an enumerator for the messages in the folder. /// /// /// Gets an enumerator for the messages in the folder. /// /// The enumerator. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// public abstract IEnumerator GetEnumerator (); /// /// Get an enumerator for the messages in the folder. /// /// /// Gets an enumerator for the messages in the folder. /// /// The enumerator. /// /// The has been disposed. /// /// /// The is not connected. /// /// /// The is not authenticated. /// /// /// The folder is not currently open. /// IEnumerator IEnumerable.GetEnumerator () { return GetEnumerator (); } #endregion /// /// Returns a that represents the current . /// /// /// Returns a that represents the current . /// /// A that represents the current . public override string ToString () { return FullName; } } }