Factory method for logging message contents.

This commit is contained in:
Alexandru Macocian
2020-10-05 13:56:27 +02:00
parent 4c0545bda9
commit cb5da000e7
2 changed files with 18 additions and 3 deletions
+3 -3
View File
@@ -5,12 +5,12 @@
<TargetFrameworks>netcoreapp2.1;net48;netstandard2.0;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<ApplicationIcon />
<StartupObject />
<Version>2.7.12</Version>
<Version>2.7.13</Version>
<Authors>Alexandru-Victor Macocian</Authors>
<Product>MTSC</Product>
<Description>Modular TCP Server and Client</Description>
<AssemblyVersion>0.2.7.12</AssemblyVersion>
<FileVersion>0.2.7.12</FileVersion>
<AssemblyVersion>0.2.7.13</AssemblyVersion>
<FileVersion>0.2.7.13</FileVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Platforms>AnyCPU;x64</Platforms>
<PackageProjectUrl>https://github.com/AlexMacocian/MTSC</PackageProjectUrl>
+15
View File
@@ -157,6 +157,11 @@ namespace MTSC.ServerSide
this.SslAuthenticationTimeout = timeout;
return this;
}
/// <summary>
/// Adds a resource to the server.
/// </summary>
/// <param name="resource"><see cref="IResource"/> resource to be added to the server.</param>
/// <returns><see cref="Server"/>.</returns>
public Server WithResource(IResource resource)
{
Resources[resource.GetType()] = resource;
@@ -173,6 +178,16 @@ namespace MTSC.ServerSide
return this;
}
/// <summary>
/// Sets the <see cref="LogMessageContents"/> property.
/// </summary>
/// <param name="logMessageContents">Value to be set.</param>
/// <returns><see cref="Server"/>.</returns>
public Server WithLoggingMessageContents(bool logMessageContents)
{
this.LogMessageContents = logMessageContents;
return this;
}
/// <summary>
/// Sets the server supported ssl protocols
/// </summary>
/// <param name="sslProtocols">Ssl protocols.</param>