Skip to content

Commit 95a1ed2

Browse files
authored
Remove old Version8 file, cleanup example codes (#260)
* Optimize readme code examples * Remove old version 8 changelog file
1 parent a5f25d0 commit 95a1ed2

File tree

2 files changed

+14
-78
lines changed

2 files changed

+14
-78
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,22 @@ static X509Certificate2 CreateCertificate()
7070
public class SampleMessageStore : MessageStore
7171
{
7272
public override async Task<SmtpResponse> SaveAsync(ISessionContext context, IMessageTransaction transaction, ReadOnlySequence<byte> buffer, CancellationToken cancellationToken)
73-
{
74-
await using var stream = new MemoryStream();
73+
{
74+
await using var stream = new MemoryStream();
7575

76-
var position = buffer.GetPosition(0);
77-
while (buffer.TryGet(ref position, out var memory))
78-
{
79-
await stream.WriteAsync(memory, cancellationToken);
80-
}
76+
var position = buffer.GetPosition(0);
77+
while (buffer.TryGet(ref position, out var memory))
78+
{
79+
await stream.WriteAsync(memory, cancellationToken);
80+
}
8181

82-
stream.Position = 0;
82+
stream.Position = 0;
8383

84-
var message = await MimeKit.MimeMessage.LoadAsync(stream, cancellationToken);
85-
Console.WriteLine(message.TextBody);
84+
var message = await MimeKit.MimeMessage.LoadAsync(stream, cancellationToken);
85+
Console.WriteLine(message.TextBody);
8686

87-
return SmtpResponse.Ok;
88-
}
87+
return SmtpResponse.Ok;
88+
}
8989
}
9090
```
9191

@@ -109,7 +109,7 @@ public class SampleMailboxFilter : IMailboxFilter, IMailboxFilterFactory
109109

110110
public IMailboxFilter CreateInstance(ISessionContext context)
111111
{
112-
return new SampleMailboxFilter();
112+
return new SampleMailboxFilter();
113113
}
114114
}
115115
```
@@ -126,7 +126,7 @@ public class SampleUserAuthenticator : IUserAuthenticator, IUserAuthenticatorFac
126126

127127
public IUserAuthenticator CreateInstance(ISessionContext context)
128128
{
129-
return new SampleUserAuthenticator();
129+
return new SampleUserAuthenticator();
130130
}
131131
}
132132
```

Version8.md

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)