RiotNet  8.0.0
A C#/.NET client for the Riot Games API.
Public Member Functions | List of all members
RiotNet.Converters.RangeConverter Class Reference

Converts a range in JSON to a consistent CLR format. More...

Inheritance diagram for RiotNet.Converters.RangeConverter:

Public Member Functions

override bool CanConvert (Type objectType)
 Determines whether this instance can convert the specified object type. More...
 
override object ReadJson (JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
 Reads the JSON representation of the ranges. More...
 
override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
 Writes the JSON representation of the ranges. More...
 

Detailed Description

Converts a range in JSON to a consistent CLR format.

A range value from the Riot Games API could be a list of integers, or the string "self". We want to convert the string "self" to an array containing a single zero.

Member Function Documentation

override bool RiotNet.Converters.RangeConverter.CanConvert ( Type  objectType)
inline

Determines whether this instance can convert the specified object type.

Parameters
objectTypeThe type to convert.
Returns
true

if this converter can convert the specified type; otherwise

false

.

override object RiotNet.Converters.RangeConverter.ReadJson ( JsonReader  reader,
Type  objectType,
object  existingValue,
JsonSerializer  serializer 
)
inline

Reads the JSON representation of the ranges.

Parameters
readerThe JsonReader to read from.
objectTypeType of the object.
existingValueThe existing value of object being read.
serializerThe calling serializer.
Returns
The object value.
override void RiotNet.Converters.RangeConverter.WriteJson ( JsonWriter  writer,
object  value,
JsonSerializer  serializer 
)
inline

Writes the JSON representation of the ranges.

Parameters
writerThe JsonWriter to write to.
valueThe date to write.
serializerThe calling serializer.

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