Class JsonKnownTypeConverter
Inheritance
System.Object
JsonKnownTypeConverter
Namespace: ArtOfTest.Common.Serialization
Assembly: ArtOfTest.WebAii.dll
Syntax
public class JsonKnownTypeConverter : JsonConverter
Constructors
JsonKnownTypeConverter(IEnumerable<Type>)
Declaration
public JsonKnownTypeConverter(IEnumerable<Type> knownTypes)
Parameters
System.Collections.Generic.IEnumerable<System.Type>
knownTypes
|
Methods
CanConvert(Type)
Declaration
public override bool CanConvert(Type objectType)
Parameters
System.Type
objectType
|
Returns
System.Boolean
|
Create(Type, JToken)
Declaration
protected object Create(Type objectType, JToken jObject)
Parameters
System.Type
objectType
|
Newtonsoft.Json.Linq.JToken
jObject
|
Returns
System.Object
|
OnTypeResolveFailure(String, Type)
Declaration
protected Type OnTypeResolveFailure(string requestedType, Type objectType)
Parameters
System.String
requestedType
|
System.Type
objectType
|
Returns
System.Type
|
ReadJson(JsonReader, Type, Object, JsonSerializer)
Declaration
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Parameters
Newtonsoft.Json.JsonReader
reader
|
System.Type
objectType
|
System.Object
existingValue
|
Newtonsoft.Json.JsonSerializer
serializer
|
Returns
System.Object
|
UpdateKnownTypes(IList<Type>)
Declaration
public void UpdateKnownTypes(IList<Type> typesToAdd)
Parameters
System.Collections.Generic.IList<System.Type>
typesToAdd
|
WriteJson(JsonWriter, Object, JsonSerializer)
Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
Newtonsoft.Json.JsonWriter
writer
|
System.Object
value
|
Newtonsoft.Json.JsonSerializer
serializer
|
Events
TypeResolveFailure
Declaration
public event Action<TypeResolveFailureArgs> TypeResolveFailure
Event Type
System.Action<TypeResolveFailureArgs>
|