PlanTempusApp/PlanTempus.Core/Telemetry/StopTelemetry.cs

26 lines
814 B
C#
Raw Permalink Normal View History

2026-01-10 20:39:17 +01:00
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) { }
}