Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize summary Informations #232

Merged
merged 19 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions Src/SmtpServer/Authentication/UserAuthenticator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ namespace SmtpServer.Authentication
/// </summary>
public abstract class UserAuthenticator : IUserAuthenticator
{
/// <summary>
/// Default User Authenticator
/// </summary>
public static readonly IUserAuthenticator Default = new DefaultUserAuthenticator();

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/AuthenticationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
/// </summary>
public sealed class AuthenticationContext
{
/// <summary>
/// Authentication Context in the Unauthenticated state
/// </summary>
public static readonly AuthenticationContext Unauthenticated = new AuthenticationContext();

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/ComponentModel/ServiceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ namespace SmtpServer.ComponentModel
/// </summary>
public sealed class ServiceProvider : IServiceProvider
{
/// <summary>
/// Default Service Provider
/// </summary>
public static readonly IServiceProvider Default = new ServiceProvider();

IEndpointListenerFactory _endpointListenerFactory;
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/IO/PipeWriterExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

namespace SmtpServer.IO
{
/// <summary>
/// Pipe Writer Extensions
/// </summary>
public static class PipeWriterExtensions
{
/// <summary>
Expand Down
6 changes: 6 additions & 0 deletions Src/SmtpServer/IO/PipelineException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

namespace SmtpServer.IO
{
/// <summary>
/// Pipeline Exception
/// </summary>
public abstract class PipelineException : Exception { }

/// <summary>
/// Pipeline Cancelled Exception
/// </summary>
public sealed class PipelineCancelledException : PipelineException { }
}
3 changes: 3 additions & 0 deletions Src/SmtpServer/ISmtpServerOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace SmtpServer
{
/// <summary>
/// Smtp Server Options Interface
/// </summary>
public interface ISmtpServerOptions
{
/// <summary>
Expand Down
6 changes: 6 additions & 0 deletions Src/SmtpServer/Mail/IMailbox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace SmtpServer.Mail
{
/// <summary>
/// Mailbox Interface
/// </summary>
public interface IMailbox
{
/// <summary>
Expand All @@ -16,6 +19,9 @@ public interface IMailbox
string Host { get; }
}

/// <summary>
/// Mailbox Extension Methods
/// </summary>
public static class MailboxExtensionMethods
{
/// <summary>
Expand Down
7 changes: 4 additions & 3 deletions Src/SmtpServer/Mail/Mailbox.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using System;

namespace SmtpServer.Mail
namespace SmtpServer.Mail
{
/// <summary>
/// Mailbox
/// </summary>
public sealed class Mailbox : IMailbox
{
/// <summary>
/// Empty Mailbox
/// </summary>
public static readonly IMailbox Empty = new Mailbox(string.Empty, string.Empty);

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Net/EndPointEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace SmtpServer.Net
{
/// <summary>
/// Endpoint EventArgs
/// </summary>
public sealed class EndpointEventArgs : EventArgs
{
/// <summary>
Expand Down
10 changes: 10 additions & 0 deletions Src/SmtpServer/Net/EndpointListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@

namespace SmtpServer.Net
{
/// <summary>
/// Endpoint Listener
/// </summary>
public sealed class EndpointListener : IEndpointListener
{
/// <summary>
/// EndpointListener LocalEndPoint Key
/// </summary>
public const string LocalEndPointKey = "EndpointListener:LocalEndPoint";

/// <summary>
/// EndpointListener RemoteEndPoint Key
/// </summary>
public const string RemoteEndPointKey = "EndpointListener:RemoteEndPoint";

readonly IEndpointDefinition _endpointDefinition;
Expand Down
12 changes: 7 additions & 5 deletions Src/SmtpServer/Net/EndpointListenerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@

namespace SmtpServer.Net
{
/// <summary>
/// Endpoint Listener Factory
/// </summary>
public class EndpointListenerFactory : IEndpointListenerFactory
{
/// <summary>
/// Default Endpoint Listener Factory
/// </summary>
internal static readonly IEndpointListenerFactory Default = new EndpointListenerFactory();

/// <summary>
Expand All @@ -17,11 +23,7 @@ public class EndpointListenerFactory : IEndpointListenerFactory
/// </summary>
public event EventHandler<EndpointEventArgs> EndpointStopped;

/// <summary>
/// Create an instance of an endpoint listener for the specified endpoint definition.
/// </summary>
/// <param name="endpointDefinition">The endpoint definition to create the listener for.</param>
/// <returns>The endpoint listener for the specified endpoint definition.</returns>
/// <inheritdoc />
public virtual IEndpointListener CreateListener(IEndpointDefinition endpointDefinition)
{
var tcpListener = new TcpListener(endpointDefinition.Endpoint);
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Net/IEndpointListenerFactory.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace SmtpServer.Net
{
/// <summary>
/// Endpoint Listener Factory Interface
/// </summary>
public interface IEndpointListenerFactory
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Protocol/AuthCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ namespace SmtpServer.Protocol
/// </summary>
public sealed class AuthCommand : SmtpCommand
{
/// <summary>
/// Smtp Auth Command
/// </summary>
public const string Command = "AUTH";

string _user;
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Protocol/DataCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ namespace SmtpServer.Protocol
/// </summary>
public sealed class DataCommand : SmtpCommand
{
/// <summary>
/// Smtp Data Command
/// </summary>
public const string Command = "DATA";

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Protocol/EhloCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ namespace SmtpServer.Protocol
/// </summary>
public class EhloCommand : SmtpCommand
{
/// <summary>
/// Smtp Ehlo Command
/// </summary>
public const string Command = "EHLO";

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Protocol/HeloCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ namespace SmtpServer.Protocol
/// </summary>
public class HeloCommand : SmtpCommand
{
/// <summary>
/// Smtp Helo Command
/// </summary>
public const string Command = "HELO";

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Protocol/MailCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ namespace SmtpServer.Protocol
/// </summary>
public sealed class MailCommand : SmtpCommand
{
/// <summary>
/// Smtp Mail Command
/// </summary>
public const string Command = "MAIL";

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Protocol/NoopCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ namespace SmtpServer.Protocol
/// </summary>
public sealed class NoopCommand : SmtpCommand
{
/// <summary>
/// Smtp Noop Command
/// </summary>
public const string Command = "NOOP";

/// <summary>
Expand Down
10 changes: 10 additions & 0 deletions Src/SmtpServer/Protocol/ProxyCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,19 @@ namespace SmtpServer.Protocol
/// </summary>
public sealed class ProxyCommand : SmtpCommand
{
/// <summary>
/// Proxy Source Endpoint Key
/// </summary>
public const string ProxySourceEndpointKey = "Proxy:ProxySourceEndpoint";

/// <summary>
/// Proxy Destination Endpoint Key
/// </summary>
public const string ProxyDestinationEndpointKey = "Proxy:ProxyDestinationEndpoint";

/// <summary>
/// Smtp Proxy Command
/// </summary>
public const string Command = "PROXY";

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Protocol/QuitCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ namespace SmtpServer.Protocol
/// </summary>
public sealed class QuitCommand : SmtpCommand
{
/// <summary>
/// Smtp Quit Command
/// </summary>
public const string Command = "QUIT";

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Protocol/RcptCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ namespace SmtpServer.Protocol
/// </summary>
public sealed class RcptCommand : SmtpCommand
{
/// <summary>
/// Smtp Rcpt Command
/// </summary>
public const string Command = "RCPT";

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Protocol/RsetCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ namespace SmtpServer.Protocol
/// </summary>
public sealed class RsetCommand : SmtpCommand
{
/// <summary>
/// Smtp Rset Command
/// </summary>
public const string Command = "RSET";

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Protocol/SmtpCommandFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace SmtpServer.Protocol
{
/// <summary>
/// Smtp Command Factory
/// </summary>
public class SmtpCommandFactory : ISmtpCommandFactory
{
/// <inheritdoc />
Expand Down
51 changes: 51 additions & 0 deletions Src/SmtpServer/Protocol/SmtpResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,69 @@
/// </summary>
public class SmtpResponse
{
/// <summary>
/// 250 Ok
/// </summary>
public static readonly SmtpResponse Ok = new SmtpResponse(SmtpReplyCode.Ok, "Ok");

/// <summary>
/// 220 ServiceReady
/// </summary>
public static readonly SmtpResponse ServiceReady = new SmtpResponse(SmtpReplyCode.ServiceReady, "ready when you are");

/// <summary>
/// 550 MailboxUnavailable
/// </summary>
public static readonly SmtpResponse MailboxUnavailable = new SmtpResponse(SmtpReplyCode.MailboxUnavailable, "mailbox unavailable");

/// <summary>
/// 553 MailboxNameNotAllowed
/// </summary>
public static readonly SmtpResponse MailboxNameNotAllowed = new SmtpResponse(SmtpReplyCode.MailboxNameNotAllowed, "mailbox name not allowed");

/// <summary>
/// 221 ServiceClosingTransmissionChannel
/// </summary>
public static readonly SmtpResponse ServiceClosingTransmissionChannel = new SmtpResponse(SmtpReplyCode.ServiceClosingTransmissionChannel, "bye");

/// <summary>
/// 501 SyntaxError
/// </summary>
public static readonly SmtpResponse SyntaxError = new SmtpResponse(SmtpReplyCode.SyntaxError, "syntax error");

/// <summary>
/// 552 SizeLimitExceeded
/// </summary>
public static readonly SmtpResponse SizeLimitExceeded = new SmtpResponse(SmtpReplyCode.SizeLimitExceeded, "size limit exceeded");

/// <summary>
/// 554 TransactionFailed
/// </summary>
public static readonly SmtpResponse NoValidRecipientsGiven = new SmtpResponse(SmtpReplyCode.TransactionFailed, "no valid recipients given");

/// <summary>
/// 535 AuthenticationFailed
/// </summary>
public static readonly SmtpResponse AuthenticationFailed = new SmtpResponse(SmtpReplyCode.AuthenticationFailed, "authentication failed");

/// <summary>
/// 235 AuthenticationSuccessful
/// </summary>
public static readonly SmtpResponse AuthenticationSuccessful = new SmtpResponse(SmtpReplyCode.AuthenticationSuccessful, "go ahead");

/// <summary>
/// 554 TransactionFailed
/// </summary>
public static readonly SmtpResponse TransactionFailed = new SmtpResponse(SmtpReplyCode.TransactionFailed);

/// <summary>
/// 503 BadSequence
/// </summary>
public static readonly SmtpResponse BadSequence = new SmtpResponse(SmtpReplyCode.BadSequence, "bad sequence of commands");

/// <summary>
/// 530 AuthenticationRequired
/// </summary>
public static readonly SmtpResponse AuthenticationRequired = new SmtpResponse(SmtpReplyCode.AuthenticationRequired, "authentication required");

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/Protocol/StartTlsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ namespace SmtpServer.Protocol
/// </summary>
public sealed class StartTlsCommand : SmtpCommand
{
/// <summary>
/// Smtp Start Tls Command
/// </summary>
public const string Command = "STARTTLS";

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/SessionEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace SmtpServer
{
/// <summary>
/// Session EventArgs
/// </summary>
public class SessionEventArgs : EventArgs
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/SessionFaultedEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace SmtpServer
{
/// <summary>
/// Session Faulted EventArgs
/// </summary>
public class SessionFaultedEventArgs : SessionEventArgs
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Src/SmtpServer/SmtpCommandEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace SmtpServer
{
/// <summary>
/// Smtp Command EventArgs
/// </summary>
public sealed class SmtpCommandEventArgs : SessionEventArgs
{
/// <summary>
Expand Down
Loading
Loading