=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===

This commit is contained in:
julian
2026-06-28 02:50:05 -07:00
parent a19fb90902
commit 586f02a2ca
654 changed files with 5260 additions and 0 deletions
@@ -13,6 +13,7 @@ namespace adas_core.Infrastructure.Utils;
/// <remarks>
/// The primary constructor accepts a <see cref="Type"/> that represents the value type associated with this converter.
/// </remarks>
/// <!-- aidoc:v1 sig=b735b04 -->
public class PersonConverter(Type valueType) : JsonConverter<Person>, IBsonSerializer
{
/// <summary>
@@ -22,6 +23,7 @@ public class PersonConverter(Type valueType) : JsonConverter<Person>, IBsonSeria
/// <param name="args">The BSON deserialization arguments.</param>
/// <returns>The deserialized object.</returns>
/// <exception cref="NotImplementedException">Always thrown because the method is not yet implemented.</exception>
/// <!-- aidoc:v1 sig=2a74dda body=bfa6f2f -->
public object Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
{
throw new NotImplementedException();
@@ -34,6 +36,7 @@ public class PersonConverter(Type valueType) : JsonConverter<Person>, IBsonSeria
/// <param name="args">The BSON serialization arguments containing additional settings for the serialization.</param>
/// <param name="value">The object to be serialized to BSON.</param>
/// <exception cref="NotImplementedException">Always thrown because the method has not been implemented yet.</exception>
/// <!-- aidoc:v1 sig=bd1484e body=bfa6f2f -->
public void Serialize(BsonSerializationContext context, BsonSerializationArgs args, object value)
{
throw new NotImplementedException();
@@ -47,6 +50,8 @@ public class PersonConverter(Type valueType) : JsonConverter<Person>, IBsonSeria
/// <param name="writer">The <see cref="JsonWriter"/> to which the JSON representation is written.</param>
/// <param name="value">The <see cref="Person"/> instance to serialize. If <see langword="null"/>, the method returns without writing anything.</param>
/// <param name="serializer">The <see cref="JsonSerializer"/> used during the conversion to a <see cref="JObject"/>.</param>
/// <!-- aidoc-review:v1 severity=medium kind=wrong_param_role
/// "The documentation states the `serializer` parameter is 'used during the conversion to a JObject', but `JObject.FromObject(value)` is invoked without passing `serializer`, so the parameter is unused in the method body." -->
public override void WriteJson(JsonWriter writer, Person? value, JsonSerializer serializer)
{
if (value == null) return;
@@ -64,6 +69,7 @@ public class PersonConverter(Type valueType) : JsonConverter<Person>, IBsonSeria
/// </summary>
/// <param name="value">The object instance whose property's attributes will be inspected and modified.</param>
/// <param name="propertyName">The name of the property to which the converter attribute will be added.</param>
/// <!-- aidoc:v1 sig=02b15d7 body=f8f9f45 -->
private static void AddStringEnumConverterAttribute(object value, string propertyName)
{
var prop = value.GetType().GetProperty(propertyName);
@@ -96,6 +102,7 @@ public class PersonConverter(Type valueType) : JsonConverter<Person>, IBsonSeria
/// <param name="serializer">The <see cref="JsonSerializer"/> calling the method.</param>
/// <returns>A <see cref="Person"/> instance deserialized from the JSON.</returns>
/// <exception cref="NotImplementedException">Always thrown because the method has not been implemented.</exception>
/// <!-- aidoc:v1 sig=e413d58 body=bfa6f2f -->
public override Person ReadJson(JsonReader reader, Type objectType, Person? existingValue, bool hasExistingValue,
JsonSerializer serializer)
{