28 lines
893 B
C#
28 lines
893 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
using Moonlight.Api.Http.Services.ContainerHelper.Events;
|
|
using Moonlight.Api.Http.Services.ContainerHelper.Requests;
|
|
|
|
namespace Moonlight.Api.Http.Services.ContainerHelper;
|
|
|
|
[JsonSerializable(typeof(SetVersionDto))]
|
|
[JsonSerializable(typeof(ProblemDetails))]
|
|
[JsonSerializable(typeof(RebuildEventDto))]
|
|
public partial class SerializationContext : JsonSerializerContext
|
|
{
|
|
private static JsonSerializerOptions? InternalTunedOptions;
|
|
|
|
public static JsonSerializerOptions TunedOptions
|
|
{
|
|
get
|
|
{
|
|
if (InternalTunedOptions != null)
|
|
return InternalTunedOptions;
|
|
|
|
InternalTunedOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web);
|
|
InternalTunedOptions.TypeInfoResolverChain.Add(Default);
|
|
|
|
return InternalTunedOptions;
|
|
}
|
|
}
|
|
} |