From 93699326f129b80a6f4d2c9079844fbf38a9c98b Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 27 Dec 2023 17:57:22 -0500 Subject: [PATCH] Removed unused code --- MailKit/Net/Imap/ImapEngine.cs | 36 +--------------------------------- MailKit/TextEncodings.cs | 5 ++--- 2 files changed, 3 insertions(+), 38 deletions(-) diff --git a/MailKit/Net/Imap/ImapEngine.cs b/MailKit/Net/Imap/ImapEngine.cs index 81c518c0db..5226499be2 100644 --- a/MailKit/Net/Imap/ImapEngine.cs +++ b/MailKit/Net/Imap/ImapEngine.cs @@ -1215,7 +1215,7 @@ public async Task ReadLiteralAsync (CancellationToken cancellationToken) } } - internal Task ReadLiteralAsync (bool doAsync, CancellationToken cancellationToken) + Task ReadLiteralAsync (bool doAsync, CancellationToken cancellationToken) { if (doAsync) return ReadLiteralAsync (cancellationToken); @@ -2716,24 +2716,6 @@ public async Task RunAsync (ImapCommand ic) return ic.Response; } - /// - /// Wait for the specified command to finish. - /// - /// The IMAP command. - /// Whether or not asynchronous IO methods should be used. - /// - /// is null. - /// - public Task RunAsync (ImapCommand ic, bool doAsync) - { - if (doAsync) - return RunAsync (ic); - - var response = Run (ic); - - return Task.FromResult (response); - } - public IEnumerable CreateCommands (CancellationToken cancellationToken, ImapFolder folder, string format, IList uids, params object[] args) { var vargs = new List (); @@ -2994,22 +2976,6 @@ internal async Task LookupParentFoldersAsync (IEnumerable folders, C } } - /// - /// Looks up and sets the property of each of the folders. - /// - /// The IMAP folders. - /// Whether or not asynchronous IO methods should be used. - /// The cancellation token. - internal Task LookupParentFoldersAsync (IEnumerable folders, bool doAsync, CancellationToken cancellationToken) - { - if (doAsync) - return LookupParentFoldersAsync (folders, cancellationToken); - - LookupParentFolders (folders, cancellationToken); - - return Task.CompletedTask; - } - void ProcessNamespaceResponse (ImapCommand ic) { if (QuirksMode == ImapQuirksMode.Exchange && ic.Response == ImapCommandResponse.Bad) { diff --git a/MailKit/TextEncodings.cs b/MailKit/TextEncodings.cs index 444ac41c82..0f2d62fa22 100644 --- a/MailKit/TextEncodings.cs +++ b/MailKit/TextEncodings.cs @@ -27,9 +27,8 @@ using System; using System.Text; -namespace MailKit -{ - internal class TextEncodings +namespace MailKit { + internal static class TextEncodings { public static readonly Encoding Latin1; public static readonly Encoding UTF8;