From cb5da000e7f047d7a87dca932f18e4b8d84c1efc Mon Sep 17 00:00:00 2001 From: Alexandru Macocian Date: Mon, 5 Oct 2020 13:56:27 +0200 Subject: [PATCH] Factory method for logging message contents. --- MTSC/MTSC.csproj | 6 +++--- MTSC/ServerSide/Server.cs | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/MTSC/MTSC.csproj b/MTSC/MTSC.csproj index c7ea5bb..f295c62 100644 --- a/MTSC/MTSC.csproj +++ b/MTSC/MTSC.csproj @@ -5,12 +5,12 @@ netcoreapp2.1;net48;netstandard2.0;netcoreapp3.0;netcoreapp3.1 - 2.7.12 + 2.7.13 Alexandru-Victor Macocian MTSC Modular TCP Server and Client - 0.2.7.12 - 0.2.7.12 + 0.2.7.13 + 0.2.7.13 true AnyCPU;x64 https://github.com/AlexMacocian/MTSC diff --git a/MTSC/ServerSide/Server.cs b/MTSC/ServerSide/Server.cs index 69fb934..b14c989 100644 --- a/MTSC/ServerSide/Server.cs +++ b/MTSC/ServerSide/Server.cs @@ -157,6 +157,11 @@ namespace MTSC.ServerSide this.SslAuthenticationTimeout = timeout; return this; } + /// + /// Adds a resource to the server. + /// + /// resource to be added to the server. + /// . public Server WithResource(IResource resource) { Resources[resource.GetType()] = resource; @@ -173,6 +178,16 @@ namespace MTSC.ServerSide return this; } /// + /// Sets the property. + /// + /// Value to be set. + /// . + public Server WithLoggingMessageContents(bool logMessageContents) + { + this.LogMessageContents = logMessageContents; + return this; + } + /// /// Sets the server supported ssl protocols /// /// Ssl protocols.