Refactor Create method to use expression-bodied syntax

This commit is contained in:
2026-01-29 00:01:20 +01:00
committed by GitHub
Unverified
parent cf7f922aed
commit 3fcafeaca9

View File

@@ -11,7 +11,7 @@ public class Event
public DateTimeOffset? LastRetryOn { get; set; } public DateTimeOffset? LastRetryOn { get; set; }
public uint RetryCount { get; set; } public uint RetryCount { get; set; }
public static Event Create<T>(T payload) where T : class public static Event Create<T>(T payload) where T : class => new Event
{ {
Payload = JsonSerializer.Serialize<T>(payload); Payload = JsonSerializer.Serialize<T>(payload);
PayloadType = payload.GetType().FullName!; PayloadType = payload.GetType().FullName!;