INNER CODE UNIT · C#
CorrelationContextFactory
stevejgordon/CorrelationId · src/CorrelationId/CorrelationContextFactory.cs:6
public class CorrelationContextFactory : ICorrelationContextFactory
{
private readonly ICorrelationContextAccessor _correlationContextAccessor;
/// <summary>
/// Initialises a new instance of <see cref="CorrelationContextFactory" />.
/// </summary>
public CorrelationContextFactory()
: this(null)
{ }
/// <summary>
/// Initialises a new instance of the <see cref="CorrelationContextFactory"/> class.
/// </summary>
/// <param name="correlationContextAccessor">The <see cref="ICorrelationContextAccessor"/> through which the <see cref="CorrelationContext"/> will be set.</param>
public CorrelationContextFactory(ICorrelationContextAccessor correlationContextAccessor)
{
_correlationContextAccessor = correlationContextAccessor;