-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
290 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
Source/Vima.LoggingAbstractor.Core/Parameters/IdentityParameter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
|
||
namespace Vima.LoggingAbstractor.Core.Parameters | ||
{ | ||
/// <summary> | ||
/// Represents identity parameter. | ||
/// </summary> | ||
public class IdentityParameter | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="IdentityParameter"/> class. | ||
/// </summary> | ||
/// <param name="identity">The identity.</param> | ||
/// <param name="name">The name. Can be null.</param> | ||
public IdentityParameter(string identity, string name) | ||
{ | ||
Identity = identity ?? throw new ArgumentNullException(nameof(identity)); | ||
Name = name; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the identity. | ||
/// </summary> | ||
/// <value> | ||
/// The identity. | ||
/// </value> | ||
public string Identity { get; } | ||
|
||
/// <summary> | ||
/// Gets the name. | ||
/// </summary> | ||
/// <value> | ||
/// The name. | ||
/// </value> | ||
public string Name { get; } | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
Source/Vima.LoggingAbstractor.Core/Parameters/LoggingIdentityParameter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
|
||
namespace Vima.LoggingAbstractor.Core.Parameters | ||
{ | ||
/// <summary> | ||
/// Represents logging identity parameter. | ||
/// </summary> | ||
public class LoggingIdentityParameter : ILoggingParameter<IdentityParameter> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="LoggingIdentityParameter"/> class. | ||
/// </summary> | ||
/// <param name="identity">The identity.</param> | ||
/// <param name="name">The name.</param> | ||
public LoggingIdentityParameter(string identity, string name = null) | ||
{ | ||
if (identity == null) | ||
{ | ||
throw new ArgumentNullException(nameof(identity)); | ||
} | ||
|
||
Value = new IdentityParameter(identity, name); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the parameter's value. | ||
/// </summary> | ||
/// <value> | ||
/// The parameter's value. | ||
/// </value> | ||
public IdentityParameter Value { get; } | ||
|
||
/// <summary> | ||
/// Gets the type of the logging parameter. | ||
/// </summary> | ||
/// <value> | ||
/// The type of the logging parameter. | ||
/// </value> | ||
public LoggingParameterType LoggingParameterType => LoggingParameterType.Identity; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.