Lean  $LEAN_TAG$
QuantConnect.Util.DoubleUnixSecondsDateTimeJsonConverter Class Reference

Defines a JsonConverter that serializes DateTime use the number of whole and fractional seconds since unix epoch More...

Inheritance diagram for QuantConnect.Util.DoubleUnixSecondsDateTimeJsonConverter:
[legend]

Public Member Functions

override bool CanConvert (Type objectType)
 Determines whether this instance can convert the specified object type. More...
 
- Public Member Functions inherited from QuantConnect.Util.TypeChangeJsonConverter< DateTime?, double?>
override object ReadJson (JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
 Reads the JSON representation of the object. More...
 
override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
 Writes the JSON representation of the object. More...
 
override bool CanConvert (Type objectType)
 Determines whether this instance can convert the specified object type. More...
 

Protected Member Functions

override? double Convert (DateTime? value)
 Convert the input value to a value to be serialzied More...
 
override? DateTime Convert (double? value)
 Converts the input value to be deserialized More...
 
- Protected Member Functions inherited from QuantConnect.Util.TypeChangeJsonConverter< DateTime?, double?>
virtual T Create (Type type, JToken token)
 Creates an instance of the un-projected type to be deserialized More...
 
abstract TResult Convert (T value)
 Convert the input value to a value to be serialized More...
 
abstract T Convert (TResult value)
 Converts the input value to be deserialized More...
 

Additional Inherited Members

- Protected Attributes inherited from QuantConnect.Util.TypeChangeJsonConverter< DateTime?, double?>
virtual bool PopulateProperties
 True will populate TResult object returned by Convert(TResult) with json properties More...
 

Detailed Description

Defines a JsonConverter that serializes DateTime use the number of whole and fractional seconds since unix epoch

Definition at line 24 of file DoubleUnixSecondsDateTimeJsonConverter.cs.

Member Function Documentation

◆ CanConvert()

override bool QuantConnect.Util.DoubleUnixSecondsDateTimeJsonConverter.CanConvert ( Type  objectType)

Determines whether this instance can convert the specified object type.

Parameters
objectTypeType of the object.
Returns
true if this instance can convert the specified object type; otherwise, false.

Definition at line 35 of file DoubleUnixSecondsDateTimeJsonConverter.cs.

◆ Convert() [1/2]

override? double QuantConnect.Util.DoubleUnixSecondsDateTimeJsonConverter.Convert ( DateTime?  value)
protected

Convert the input value to a value to be serialzied

Parameters
valueThe input value to be converted before serialziation
Returns
A new instance of TResult that is to be serialzied

Definition at line 46 of file DoubleUnixSecondsDateTimeJsonConverter.cs.

◆ Convert() [2/2]

override? DateTime QuantConnect.Util.DoubleUnixSecondsDateTimeJsonConverter.Convert ( double?  value)
protected

Converts the input value to be deserialized

Parameters
valueThe deserialized value that needs to be converted to T
Returns
The converted value

Definition at line 61 of file DoubleUnixSecondsDateTimeJsonConverter.cs.


The documentation for this class was generated from the following file: