-
-
Notifications
You must be signed in to change notification settings - Fork 805
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced Add/Remove/SetFlags() APIs with Store()
- Loading branch information
Showing
10 changed files
with
4,219 additions
and
5,185 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// | ||
// IStoreFlagsRequest.cs | ||
// | ||
// Author: Jeffrey Stedfast <jestedfa@microsoft.com> | ||
// | ||
// Copyright (c) 2013-2021 .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.Collections.Generic; | ||
|
||
namespace MailKit { | ||
/// <summary> | ||
/// A request for storing message flags. | ||
/// </summary> | ||
/// <remarks> | ||
/// A request for storing message flags. | ||
/// </remarks> | ||
public interface IStoreFlagsRequest : IStoreRequest | ||
{ | ||
/// <summary> | ||
/// Get the store action to perform. | ||
/// </summary> | ||
/// <remarks> | ||
/// Gets the store action to perform. | ||
/// </remarks> | ||
/// <value>The store action.</value> | ||
StoreAction Action { get; } | ||
|
||
/// <summary> | ||
/// Get or set the message flags that should be added, removed, or set. | ||
/// </summary> | ||
/// <remarks> | ||
/// Gets or sets the message flags that should be added, removed, or set. | ||
/// </remarks> | ||
/// <value>The message flags.</value> | ||
MessageFlags Flags { get; set; } | ||
|
||
/// <summary> | ||
/// Get the keywords that should be added, removed, or set. | ||
/// </summary> | ||
/// <remarks> | ||
/// Gets the keywords that should be added, removed, or set. | ||
/// </remarks> | ||
/// <value>The keywords.</value> | ||
ISet<string> Keywords { get; } | ||
|
||
/// <summary> | ||
/// Get or set whether the store operation should run silently. | ||
/// </summary> | ||
/// <remarks> | ||
/// <para>Gets or sets whether the store operation should run silently.</para> | ||
/// <para>Normally, when flags or keywords are changed on a message, a <see cref="IMailFolder.MessageFlagsChanged"/> event is emitted. | ||
/// By setting <see cref="Silent"/> to <c>true</c>, this event will not be emitted as a result of this store operation.</para> | ||
/// </remarks> | ||
/// <value><c>true</c> if the store operation should run silently (not emitting events for flag changes); otherwise, <c>false</c>.</value> | ||
bool Silent { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// IStoreRequest.cs | ||
// | ||
// Author: Jeffrey Stedfast <jestedfa@microsoft.com> | ||
// | ||
// Copyright (c) 2013-2021 .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. | ||
// | ||
|
||
namespace MailKit { | ||
/// <summary> | ||
/// A request for storing flags, labels, or annotations for a message. | ||
/// </summary> | ||
/// <remarks> | ||
/// A request for storing flags, labels, or annotations for a message. | ||
/// </remarks> | ||
public interface IStoreRequest | ||
{ | ||
/// <summary> | ||
/// Get or set the mod-sequence value that indicates the last known state of the message(s) being updated. | ||
/// </summary> | ||
/// <remarks> | ||
/// <para>Gets or sets the mod-sequence value that indicates the last known state of the message(s) being updated.</para> | ||
/// <para>If this property is set, only messages that have not had their flags modified since the specified mod-sequence | ||
/// state will have their flags updated by the <a href="Overload_MailKit_IMailFolder_Store.htm">Store</a> | ||
/// or <a href="Overload_MailKit_IMailFolder_StoreAsync.htm">StoreAsync</a> mnethods.</para> | ||
/// </remarks> | ||
ulong? UnchangedSince { get; set; } | ||
} | ||
} |
Oops, something went wrong.