Table of Contents

Class CloudConverter

Namespace
Glitch9.IO.Networking

Provides methods to convert objects to and from cloud-storable formats.

public static class CloudConverter
Inheritance
CloudConverter
Inherited Members

Properties

Logger

Sets the logger to output logs.

public static ILogger Logger { get; set; }

Property Value

ILogger

Methods

GetConverter(Type)

Retrieves the converter for the specified type.

public static ICloudConverter GetConverter(Type type)

Parameters

type Type

The type for which to retrieve the converter.

Returns

ICloudConverter

The converter for the specified type, or null if no converter is found.

RegisterGenericConverter<T>(CloudConverter<T>)

Registers a generic converter for the specified type.

public static void RegisterGenericConverter<T>(CloudConverter<T> converter)

Parameters

converter CloudConverter<T>

The converter instance.

Type Parameters

T

The type to be converted.

ToCloudFormat(Type, object)

Converts the given property value to the cloud format.

public static object ToCloudFormat(Type type, object propertyValue)

Parameters

type Type

The type of the property.

propertyValue object

The value of the property.

Returns

object

The converted value in cloud format.

ToLocalFormat(Type, string, object)

Converts the given property value to the local format.

public static object ToLocalFormat(Type type, string propertyName, object propertyValue)

Parameters

type Type

The type of the property.

propertyName string

The name of the property.

propertyValue object

The value of the property.

Returns

object

The converted value in local format.