# Class HistoricalConfigChanges

Namespace
  adas_core.Domain.Models.MongoModels

Assembly
  adas-core.Domain.dll

Represents a custom JSON converter for serializing and deserializing historical configuration changes.

    public class HistoricalConfigChanges : JsonConverter

Inheritance
  object
  JsonConverter
  HistoricalConfigChanges

Inherited Members
  JsonConverter.CanRead
  JsonConverter.CanWrite
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

Extension Methods
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## Remarks

This converter extends Newtonsoft.Json.JsonConverter to provide tailored JSON conversion behavior for historical config change data.

## Fields

### Time

    public DateTime Time

#### Field Value

DateTime

### Username

    public string Username

#### Field Value

string

## Properties

### ConfigType

    public DisplayConfigEnums.ConfigTypes? ConfigType { get; set; }

#### Property Value

DisplayConfigEnums.ConfigTypes?

### Id

    public ObjectId Id { get; set; }

#### Property Value

ObjectId

### NewConfig

    public string NewConfig { get; set; }

#### Property Value

string

### OldConfig

    public string? OldConfig { get; set; }

#### Property Value

string

## Methods

### CanConvert(Type)

Determines whether the converter can convert the specified type. The override has not been implemented and always throws a NotImplementedException when invoked.

    public override bool CanConvert(Type objectType)

#### Parameters

`objectType` Type

  The type to evaluate for convertibility.

#### Returns

bool

  true when the converter supports `objectType`; otherwise, false.

#### Exceptions

NotImplementedException

  Thrown in all cases because the method body is not implemented.

### ReadJson(JsonReader, Type, object?, JsonSerializer)

Reads the JSON representation of the object and converts it to the target type as part of a custom Newtonsoft.Json.JsonConverter. This implementation is not yet provided.

    public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)

#### Parameters

`reader` JsonReader

  The Newtonsoft.Json.JsonReader used to read the JSON content.

`objectType` Type

  The type of the object to deserialize to.

`existingValue` object

  The existing value of the object being read, or `null` if no value exists.

`serializer` JsonSerializer

  The Newtonsoft.Json.JsonSerializer used to deserialize nested objects.

#### Returns

object

  The deserialized object value.

#### Exceptions

NotImplementedException

  Always thrown because the method has not been implemented.

### WriteJson(JsonWriter, object?, JsonSerializer)

Serializes the specified object to JSON, skipping output when the value is `null`. The object is first projected into a Newtonsoft.Json.Linq.JObject and annotated with a string enum converter for the `ConfigType` property before being written to the `writer`.

    public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)

#### Parameters

`writer` JsonWriter

  The Newtonsoft.Json.JsonWriter that receives the serialized JSON output.

`value` object

  The object to serialize. If `null`, the method does nothing.

`serializer` JsonSerializer

  The Newtonsoft.Json.JsonSerializer used during serialization.