Microsoft.Bot.Builder.Calling.ObjectModel.Misc.JsonCreationConverter< T > Class Template Referenceabstract

Helper class to use for deserializing where the concrete classes are determined by checking properties in the JSON data. More...

Inheritance diagram for Microsoft.Bot.Builder.Calling.ObjectModel.Misc.JsonCreationConverter< T >:

Public Member Functions

override bool CanConvert (Type objectType)
 Determines if this converted is designed to deserialization to objects of the specified type. More...
 
override object ReadJson (JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
 Parses the json to the specified type. More...
 
override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
 Serializes to the specified type More...
 

Protected Member Functions

abstract T Create (Type objectType, JObject jsonObject)
 Create an instance of objectType, based properties in the JSON object More...
 

Properties

override bool CanWrite [get]
 Let Newtonsoft.Json use the default writer More...
 

Detailed Description

Helper class to use for deserializing where the concrete classes are determined by checking properties in the JSON data.

Template Parameters
T

Definition at line 12 of file JsonCreationConverter.cs.

Member Function Documentation

override bool Microsoft.Bot.Builder.Calling.ObjectModel.Misc.JsonCreationConverter< T >.CanConvert ( Type  objectType)
inline

Determines if this converted is designed to deserialization to objects of the specified type.

Parameters
objectTypeThe target type for deserialization.
Returns
True if the type is supported.

Definition at line 22 of file JsonCreationConverter.cs.

abstract T Microsoft.Bot.Builder.Calling.ObjectModel.Misc.JsonCreationConverter< T >.Create ( Type  objectType,
JObject  jsonObject 
)
protectedpure virtual

Create an instance of objectType, based properties in the JSON object

Parameters
objectTypetype of object expected
jsonObjectcontents of JSON object that will be deserialized

Implemented in Microsoft.Bot.Builder.Calling.ObjectModel.Contracts.ActionConverter, Microsoft.Bot.Builder.Calling.ObjectModel.Contracts.NotificationConverter, and Microsoft.Bot.Builder.Calling.ObjectModel.Contracts.OperationOutcomeConverter.

override object Microsoft.Bot.Builder.Calling.ObjectModel.Misc.JsonCreationConverter< T >.ReadJson ( JsonReader  reader,
Type  objectType,
object  existingValue,
JsonSerializer  serializer 
)
inline

Parses the json to the specified type.

Parameters
readerNewtonsoft.Json.JsonReader
objectTypeTarget type.
existingValueIgnored
serializerNewtonsoft.Json.JsonSerializer to use.
Returns
Deserialized Object

Definition at line 44 of file JsonCreationConverter.cs.

override void Microsoft.Bot.Builder.Calling.ObjectModel.Misc.JsonCreationConverter< T >.WriteJson ( JsonWriter  writer,
object  value,
JsonSerializer  serializer 
)
inline

Serializes to the specified type

Parameters
writerNewtonsoft.Json.JsonWriter
valueObject to serialize.
serializerNewtonsoft.Json.JsonSerializer to use.

Definition at line 72 of file JsonCreationConverter.cs.

Property Documentation

Let Newtonsoft.Json use the default writer

Definition at line 31 of file JsonCreationConverter.cs.


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