• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jstedfast / MailKit / 4.15.0.1569

24 Feb 2026 01:38PM UTC coverage: 0.0% (-92.9%) from 92.887%
4.15.0.1569

push

coveralls.net

web-flow
Merge adfebe6b0 into a2766daa1

0 of 25777 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/MailKit/Search/AnnotationSearchQuery.cs
1
//
2
// AnnotationSearchQuery.cs
3
//
4
// Author: Jeffrey Stedfast <jestedfa@microsoft.com>
5
//
6
// Copyright (c) 2013-2026 .NET Foundation and Contributors
7
//
8
// Permission is hereby granted, free of charge, to any person obtaining a copy
9
// of this software and associated documentation files (the "Software"), to deal
10
// in the Software without restriction, including without limitation the rights
11
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
// copies of the Software, and to permit persons to whom the Software is
13
// furnished to do so, subject to the following conditions:
14
//
15
// The above copyright notice and this permission notice shall be included in
16
// all copies or substantial portions of the Software.
17
//
18
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
// THE SOFTWARE.
25
//
26

27
using System;
28

29
namespace MailKit.Search
30
{
31
        /// <summary>
32
        /// An annotation-based search query.
33
        /// </summary>
34
        /// <remarks>
35
        /// An annotation-based search query.
36
        /// </remarks>
37
        public class AnnotationSearchQuery : SearchQuery
38
        {
39
                /// <summary>
40
                /// Initializes a new instance of the <see cref="T:MailKit.Search.AnnotationSearchQuery"/> class.
41
                /// </summary>
42
                /// <remarks>
43
                /// Creates a new annotation-based search query.
44
                /// </remarks>
45
                /// <param name="entry">The annotation entry.</param>
46
                /// <param name="attribute">The annotation attribute.</param>
47
                /// <param name="value">The annotation attribute value.</param>
48
                /// <exception cref="System.ArgumentNullException">
49
                /// <para><paramref name="entry"/> is <see langword="null" />.</para>
50
                /// <para>-or-</para>
51
                /// <para><paramref name="attribute"/> is <see langword="null" />.</para>
52
                /// </exception>
53
                /// <exception cref="System.ArgumentException">
54
                /// <paramref name="attribute"/> is not a valid attribute for searching.
55
                /// </exception>
56
                public AnnotationSearchQuery (AnnotationEntry entry, AnnotationAttribute attribute, string value) : base (SearchTerm.Annotation)
×
57
                {
×
58
                        if (entry is null)
×
59
                                throw new ArgumentNullException (nameof (entry));
×
60

61
                        if (attribute is null)
×
62
                                throw new ArgumentNullException (nameof (attribute));
×
63

64
                        if (attribute.Name != "value")
×
65
                                throw new ArgumentException ("Only the \"value\", \"value.priv\", and \"value.shared\" attributes can be searched.", nameof (attribute));
×
66

67
                        Attribute = attribute;
×
68
                        Entry = entry;
×
69
                        Value = value;
×
70
                }
×
71

72
                /// <summary>
73
                /// Get the annotation entry.
74
                /// </summary>
75
                /// <remarks>
76
                /// Gets the annotation entry.
77
                /// </remarks>
78
                /// <value>The annotation entry.</value>
79
                public AnnotationEntry Entry {
80
                        get; private set;
81
                }
82

83
                /// <summary>
84
                /// Get the annotation attribute.
85
                /// </summary>
86
                /// <remarks>
87
                /// Gets the annotation attribute.
88
                /// </remarks>
89
                /// <value>The annotation attribute.</value>
90
                public AnnotationAttribute Attribute {
91
                        get; private set;
92
                }
93

94
                /// <summary>
95
                /// Get the annotation attribute value.
96
                /// </summary>
97
                /// <remarks>
98
                /// Gets the annotation attribute value.
99
                /// </remarks>
100
                /// <value>The annotation attribute value.</value>
101
                public string Value {
102
                        get; private set;
103
                }
104
        }
105
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc