Files
GX.O3.WMS/APP.O3/Domain/Interface/TraceId/ITraceContextFactory.cs
T

25 lines
889 B
C#
Executable File

using Opsoft.NetCore.O3App.Domain.Models;
namespace Opsoft.NetCore.O3App.Domain
{
/// <summary>
/// A factory for creating and disposing an instance of a <see cref="TraceContext"/>.
/// </summary>
public interface ITraceContextFactory
{
/// <summary>
/// Creates a new <see cref="TraceContext"/> with the Trace ID set for the current request.
/// </summary>
/// <param name="traceId">The Trace ID to set on the context.</param>
/// /// <param name="header">The header used to hold the Trace ID.</param>
/// <returns>A new instance of a <see cref="TraceContext"/>.</returns>
TraceContext Create(string traceId, string header);
/// <summary>
/// Disposes of the <see cref="TraceContext"/> for the current request.
/// </summary>
void Dispose();
}
}