26 lines
814 B
C#
26 lines
814 B
C#
|
|
using Microsoft.ApplicationInsights.Channel;
|
||
|
|
using Microsoft.ApplicationInsights.DataContracts;
|
||
|
|
using Microsoft.ApplicationInsights.Extensibility;
|
||
|
|
|
||
|
|
namespace PlanTempus.Core.Telemetry;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Signal telemetry der bruges til at stoppe SeqBackgroundService gracefully.
|
||
|
|
/// Når denne læses fra channel, stopper servicen efter at have processeret alle tidligere beskeder.
|
||
|
|
/// </summary>
|
||
|
|
public class StopTelemetry : ITelemetry
|
||
|
|
{
|
||
|
|
public DateTimeOffset Timestamp { get; set; }
|
||
|
|
public string Sequence { get; set; }
|
||
|
|
public TelemetryContext Context { get; } = new TelemetryContext();
|
||
|
|
public IExtension Extension { get; set; }
|
||
|
|
|
||
|
|
public ITelemetry DeepClone() => new StopTelemetry();
|
||
|
|
|
||
|
|
public void Sanitize() { }
|
||
|
|
|
||
|
|
public void SerializeData(ISerializationWriter serializationWriter) { }
|
||
|
|
|
||
|
|
|
||
|
|
}
|