mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-06 02:23:43 -04:00
Initial Commit
This commit is contained in:
@ -1,21 +1,19 @@
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Observatory.Framework.Files.Converters
|
||||
namespace Observatory.Framework.Files.Converters;
|
||||
|
||||
class PipConverter : JsonConverter<(int Sys, int Eng, int Wep)>
|
||||
{
|
||||
class PipConverter : JsonConverter<(int Sys, int Eng, int Wep)>
|
||||
public override (int Sys, int Eng, int Wep) Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
public override (int Sys, int Eng, int Wep) Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
int[] values = (int[])JsonSerializer.Deserialize(ref reader, typeof(int[]));
|
||||
var values = (int[])JsonSerializer.Deserialize(ref reader, typeof(int[]));
|
||||
|
||||
return (Sys: values[0], Eng: values[1], Wep: values[2]);
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, (int Sys, int Eng, int Wep) value, JsonSerializerOptions options)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
return (Sys: values[0], Eng: values[1], Wep: values[2]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, (int Sys, int Eng, int Wep) value, JsonSerializerOptions options)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user