Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3adad3a
Updated IMessageSummary, BodyPart* and Envelope to support nullability
jstedfast Feb 19, 2026
3c08fcd
Updated ClientMetrics for nullability
jstedfast Feb 19, 2026
78491d7
Updated FolderQuota for nullability
jstedfast Feb 19, 2026
f6eb6b5
Started working on nullability for the IMAP API
jstedfast Feb 19, 2026
10d17b6
Updated SaslMechanism API for nullability
jstedfast Feb 20, 2026
46e1c38
Updated SocketUtils for nullability
jstedfast Feb 20, 2026
0b698d3
Updated SslHandshakeException for nullability
jstedfast Feb 20, 2026
7b66f95
Updated ProxyClients for nullability
jstedfast Feb 20, 2026
2f43f60
Updated Smtp and Pop3 clients for nullability
jstedfast Feb 20, 2026
808eed5
Lots of IMAP nullability fixes
jstedfast Feb 20, 2026
05d950e
Fixed up NTLM for nullability
jstedfast Feb 21, 2026
3051774
Fixed MessageSorter and MessageThreader classes for nullability
jstedfast Feb 21, 2026
7d2a63c
More NTLM fixes for nullability
jstedfast Feb 21, 2026
7ec095e
More IMAP nullability fixes
jstedfast Feb 21, 2026
421527c
Fixed ByteArrayBuilder for nullability
jstedfast Feb 21, 2026
8637683
More NTLM nullability fixes
jstedfast Feb 21, 2026
98a6f09
ImapResponseCode nullability fixes
jstedfast Feb 21, 2026
15b9fe7
Telemetry nullability fixes
jstedfast Feb 21, 2026
972f0db
More Telemetry nullability fixes
jstedfast Feb 21, 2026
75b236e
More IMAP nullability fixes
jstedfast Feb 21, 2026
ec08b84
General nullability fixes
jstedfast Feb 21, 2026
5ad312b
ImapFolder and MailFolder nullability fixes
jstedfast Feb 21, 2026
32aead8
Fixed BodyPart (and subclasses) for nullability
jstedfast Feb 22, 2026
bf690fb
Fixed BodyPartVisitor nullability
jstedfast Feb 22, 2026
3a0a4c9
Fixed ImapProtocolException ResponseText nullability
jstedfast Feb 22, 2026
31b838a
Fixed ImapUtils EnvelopeAddress nullability
jstedfast Feb 22, 2026
9ad50c1
IMAP annotation values can be NIL
jstedfast Feb 22, 2026
74bb4d7
Fixed MessageThreadingTests
jstedfast Feb 22, 2026
ba5507a
Merge branch 'master' into nullability-api
jstedfast Feb 22, 2026
40fad48
Fixed Envelope (now passes tests)
jstedfast Feb 22, 2026
8abfdf1
Fixed SASL tests
jstedfast Feb 22, 2026
a40ac05
Fixed NtlmAuthenticationMessageTests
jstedfast Feb 22, 2026
583c12c
Use MemberNotNull with nameof
jstedfast Feb 22, 2026
cab4c7a
minor code flow changes in ImapCommand/ProtocolException
jstedfast Feb 22, 2026
73c2dbe
ImapFolder cleanup to avoid the need for !
jstedfast Feb 22, 2026
c48c62c
More cleanup
jstedfast Feb 22, 2026
dc03ffc
Removed ImapFolder .ctor that I decided not to add
jstedfast Feb 22, 2026
4c901d4
Code refacoring to reduce ! usage in Pop3/Imap/SmtpClient
jstedfast Feb 22, 2026
5c022a3
refactored ValidateRemoteCertificate logic to reduce ! usage
jstedfast Feb 22, 2026
49327b8
Refactored more IMAP code to reduce ! usage
jstedfast Feb 22, 2026
a55bf8c
Refactored Pop3Engine a bit
jstedfast Feb 22, 2026
77cc4f0
A few minor refactorings for IMAP ! usage
jstedfast Feb 22, 2026
b371ca7
Refactored Pop3Client a bit to reduce ! usage
jstedfast Feb 22, 2026
1cd0f0e
More refactoring to improve IMAP nullability
jstedfast Feb 23, 2026
adfebe6
Updated ImapEngine.ProcessUntaggedResponse() to take an ImapCommand a…
jstedfast Feb 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MailKit/AccessRight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public bool Equals (AccessRight other)
/// <param name="obj">The <see cref="System.Object"/> to compare with the current <see cref="MailKit.AccessRight"/>.</param>
/// <returns><see langword="true" /> if the specified <see cref="System.Object"/> is equal to the current <see cref="MailKit.AccessRight"/>;
/// otherwise, <see langword="false" />.</returns>
public override bool Equals (object obj)
public override bool Equals (object? obj)
{
return obj is AccessRight right && right.Right == Right;
}
Expand Down
6 changes: 3 additions & 3 deletions MailKit/Annotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public class Annotation
/// </exception>
public Annotation (AnnotationEntry entry)
{
if (entry == null)
if (entry is null)
throw new ArgumentNullException (nameof (entry));

Properties = new Dictionary<AnnotationAttribute, string> ();
Properties = new Dictionary<AnnotationAttribute, string?> ();
Entry = entry;
}

Expand All @@ -75,7 +75,7 @@ public AnnotationEntry Entry {
/// Gets the annotation properties.
/// </remarks>
/// <value>The annotation properties.</value>
public Dictionary<AnnotationAttribute, string> Properties {
public Dictionary<AnnotationAttribute, string?> Properties {
get; private set;
}
}
Expand Down
4 changes: 2 additions & 2 deletions MailKit/AnnotationAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public string Specifier {
/// <param name="other">The <see cref="MailKit.AnnotationAttribute"/> to compare with the current <see cref="MailKit.AnnotationAttribute"/>.</param>
/// <returns><see langword="true" /> if the specified <see cref="MailKit.AnnotationAttribute"/> is equal to the current
/// <see cref="MailKit.AnnotationAttribute"/>; otherwise, <see langword="false" />.</returns>
public bool Equals (AnnotationAttribute other)
public bool Equals (AnnotationAttribute? other)
{
return other?.Specifier == Specifier;
}
Expand Down Expand Up @@ -225,7 +225,7 @@ public bool Equals (AnnotationAttribute other)
/// <param name="obj">The <see cref="System.Object"/> to compare with the current <see cref="MailKit.AnnotationAttribute"/>.</param>
/// <returns><see langword="true" /> if the specified <see cref="System.Object"/> is equal to the current
/// <see cref="MailKit.AnnotationAttribute"/>; otherwise, <see langword="false" />.</returns>
public override bool Equals (object obj)
public override bool Equals (object? obj)
{
return obj is AnnotationAttribute attribute && attribute.Specifier == Specifier;
}
Expand Down
24 changes: 13 additions & 11 deletions MailKit/AnnotationEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,12 @@ static void ValidatePartSpecifier (string partSpecifier)
throw new ArgumentException ("Invalid part-specifier.", nameof (partSpecifier));
}

AnnotationEntry ()
AnnotationEntry (string? partSpecifier, string entry, string path, AnnotationScope scope)
{
PartSpecifier = partSpecifier;
Entry = entry;
Path = path;
Scope = scope;
}

/// <summary>
Expand All @@ -199,6 +203,7 @@ public AnnotationEntry (string path, AnnotationScope scope = AnnotationScope.Bot
case AnnotationScope.Shared: Entry = path + ".shared"; break;
default: Entry = path; break;
}

PartSpecifier = null;
Path = path;
Scope = scope;
Expand Down Expand Up @@ -233,6 +238,7 @@ public AnnotationEntry (string partSpecifier, string path, AnnotationScope scope
case AnnotationScope.Shared: Entry = string.Format ("/{0}{1}.shared", partSpecifier, path); break;
default: Entry = string.Format ("/{0}{1}", partSpecifier, path); break;
}

PartSpecifier = partSpecifier;
Path = path;
Scope = scope;
Expand Down Expand Up @@ -267,6 +273,7 @@ public AnnotationEntry (BodyPart part, string path, AnnotationScope scope = Anno
case AnnotationScope.Shared: Entry = string.Format ("/{0}{1}.shared", part.PartSpecifier, path); break;
default: Entry = string.Format ("/{0}{1}", part.PartSpecifier, path); break;
}

PartSpecifier = part.PartSpecifier;
Path = path;
Scope = scope;
Expand All @@ -290,7 +297,7 @@ public string Entry {
/// Gets the part-specifier component of the annotation entry.
/// </remarks>
/// <value>The part-specifier.</value>
public string PartSpecifier {
public string? PartSpecifier {
get; private set;
}

Expand Down Expand Up @@ -327,7 +334,7 @@ public AnnotationScope Scope {
/// <param name="other">The <see cref="MailKit.AnnotationEntry"/> to compare with the current <see cref="MailKit.AnnotationEntry"/>.</param>
/// <returns><see langword="true" /> if the specified <see cref="MailKit.AnnotationEntry"/> is equal to the current
/// <see cref="MailKit.AnnotationEntry"/>; otherwise, <see langword="false" />.</returns>
public bool Equals (AnnotationEntry other)
public bool Equals (AnnotationEntry? other)
{
return other?.Entry == Entry;
}
Expand Down Expand Up @@ -371,7 +378,7 @@ public bool Equals (AnnotationEntry other)
/// <param name="obj">The <see cref="System.Object"/> to compare with the current <see cref="MailKit.AnnotationEntry"/>.</param>
/// <returns><see langword="true" /> if the specified <see cref="System.Object"/> is equal to the current
/// <see cref="MailKit.AnnotationEntry"/>; otherwise, <see langword="false" />.</returns>
public override bool Equals (object obj)
public override bool Equals (object? obj)
{
return obj is AnnotationEntry entry && entry.Entry == Entry;
}
Expand Down Expand Up @@ -427,7 +434,7 @@ public static AnnotationEntry Parse (string entry)

var scope = AnnotationScope.Both;
int startIndex = 0, endIndex;
string partSpecifier = null;
string? partSpecifier = null;
var component = 0;
var pc = entry[0];
string path;
Expand Down Expand Up @@ -497,12 +504,7 @@ public static AnnotationEntry Parse (string entry)

path = entry.Substring (startIndex, endIndex - startIndex);

return new AnnotationEntry {
PartSpecifier = partSpecifier,
Entry = entry,
Path = path,
Scope = scope
};
return new AnnotationEntry (partSpecifier, entry, path, scope);
}

internal static AnnotationEntry Create (string entry)
Expand Down
11 changes: 0 additions & 11 deletions MailKit/AnnotationsChangedEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,6 @@ namespace MailKit {
/// </remarks>
public class AnnotationsChangedEventArgs : MessageEventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="MailKit.AnnotationsChangedEventArgs"/> class.
/// </summary>
/// <remarks>
/// Creates a new <see cref="AnnotationsChangedEventArgs"/>.
/// </remarks>
/// <param name="index">The message index.</param>
internal AnnotationsChangedEventArgs (int index) : base (index)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="T:MailKit.AnnotationsChangedEventArgs"/> class.
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions MailKit/AppendRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public MessageFlags Flags {
/// Gets or sets the keywords that should be set on the message.
/// </remarks>
/// <value>The keywords.</value>
public ISet<string> Keywords {
public ISet<string>? Keywords {
get; set;
}

Expand All @@ -192,7 +192,7 @@ public DateTimeOffset? InternalDate {
/// </note>
/// </remarks>
/// <value>The list of annotations.</value>
public IList<Annotation> Annotations {
public IList<Annotation>? Annotations {
get; set;
}

Expand All @@ -203,7 +203,7 @@ public IList<Annotation> Annotations {
/// Gets or sets the transfer progress reporting mechanism.
/// </remarks>
/// <value>The transfer progress mechanism.</value>
public ITransferProgress TransferProgress {
public ITransferProgress? TransferProgress {
get; set;
}
}
Expand Down
Loading
Loading