Class ConverterHelper
- Namespace
- Geotab.Checkmate.Serialization
- Assembly
- Geotab.Checkmate.ObjectModel.dll
A class that contains helper methods for working with GeotabJsonConverter2<T> classes.
public static class ConverterHelper
- Inheritance
-
ConverterHelper
- Inherited Members
Methods
ShouldSerializeAllProps<T>(object)
A Func that controls which properties are serialized, and handles any non-standard property serialization.
public static Func<PropertyInfo, T, object?> ShouldSerializeAllProps<T>(object serialize)
Parameters
serialize
objectThe object used to indicate that something should be serialized. See GeotabJsonConverter2<T>
Returns
- Func<PropertyInfo, T, object>
This Func should return one of three things: the Serialize object which tells the caller to serialize this property, the DontSerialize object which tells the caller to skip this property, or a value to be serialized.
Type Parameters
T
The type of object being converted.
ShouldSerializeIdOnly<T>(object, object)
A Func that controls which properties are serialized, and handles any non-standard property serialization.
public static Func<PropertyInfo, T, object?> ShouldSerializeIdOnly<T>(object serialize, object dontSerialize)
Parameters
serialize
objectThe object used to indicate that something should be serialized. See GeotabJsonConverter2<T>
dontSerialize
objectThe object used to indicate that something should not be serialized. See GeotabJsonConverter2<T>
Returns
- Func<PropertyInfo, T, object>
This Func should return one of three things: the Serialize object which tells the caller to serialize this property, the DontSerialize object which tells the caller to skip this property, or a value to be serialized.
Type Parameters
T
The type of object being converted.