Class TimeSpanSecondsConverter
Inherited Members
JsonConverter.CanRead
JsonConverter.CanWrite
Namespace: GitCredentialManager.Authentication.OAuth.Json
Assembly: Algenta.Colectica.Repository.Client.dll
Syntax
public class TimeSpanSecondsConverter : JsonConverter<TimeSpan?>
Methods
ReadJson(JsonReader, Type, TimeSpan?, bool, JsonSerializer)
Reads the JSON representation of the object.
Declaration
public override TimeSpan? ReadJson(JsonReader reader, Type objectType, TimeSpan? existingValue, bool hasExistingValue, JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
JsonReader | reader | The Newtonsoft.Json.JsonReader to read from. |
Type | objectType | Type of the object. |
TimeSpan? | existingValue | The existing value of object being read. If there is no existing value then |
bool | hasExistingValue | The existing value has a value. |
JsonSerializer | serializer | The calling serializer. |
Returns
Type | Description |
---|---|
TimeSpan? | The object value. |
Overrides
WriteJson(JsonWriter, TimeSpan?, JsonSerializer)
Writes the JSON representation of the object.
Declaration
public override void WriteJson(JsonWriter writer, TimeSpan? value, JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
JsonWriter | writer | The Newtonsoft.Json.JsonWriter to write to. |
TimeSpan? | value | The value. |
JsonSerializer | serializer | The calling serializer. |