Craig's Utility Library  4.0 Beta
Utilities.IO.Serializers.Manager Class Reference

Serialization manager class More...

Public Member Functions

 Manager (IEnumerable< ISerializer > Serializers)
 Constructor More...
 
bool CanSerialize (string ContentType)
 Determines if the system can serialize/deserialize the content type More...
 
Deserialize< T, R > (T Data, string ContentType="application/json")
 Deserializes the data to an object More...
 
object Deserialize< T > (T Data, Type ObjectType, string ContentType="application/json")
 Deserializes the data to an object More...
 
string FileTypeToContentType (string FileType)
 File type to content type More...
 
Serialize< T, R > (T Object, string ContentType="application/json")
 Serializes the object based on the content type specified More...
 
Serialize< T > (object Object, Type ObjectType, string ContentType="application/json")
 Serializes the object based on the content type specified More...
 
override string ToString ()
 Outputs information about the serializers the system is using More...
 

Properties

IDictionary< string, ISerializerSerializers [get]
 Serializers More...
 

Detailed Description

Serialization manager class

Definition at line 35 of file Manager.cs.

Constructor & Destructor Documentation

Utilities.IO.Serializers.Manager.Manager ( IEnumerable< ISerializer Serializers)

Constructor

Parameters
SerializersThe serializers.

Definition at line 41 of file Manager.cs.

Member Function Documentation

bool Utilities.IO.Serializers.Manager.CanSerialize ( string  ContentType)

Determines if the system can serialize/deserialize the content type

Parameters
ContentTypeContent type
Returns
True if it can, false otherwise

Definition at line 64 of file Manager.cs.

object Utilities.IO.Serializers.Manager.Deserialize< T > ( Data,
Type  ObjectType,
string  ContentType = "application/json" 
)

Deserializes the data to an object

Template Parameters
TType of the data
Parameters
DataData to deserialize
ObjectTypeObject type requested
ContentTypeContent type (MIME type)
Returns
The deserialized object

Definition at line 92 of file Manager.cs.

R Utilities.IO.Serializers.Manager.Deserialize< T, R > ( Data,
string  ContentType = "application/json" 
)

Deserializes the data to an object

Template Parameters
TData type
RReturn object type
Parameters
DataData to deserialize
ContentTypeContent type (MIME type)
Returns
The deserialized object

Definition at line 78 of file Manager.cs.

string Utilities.IO.Serializers.Manager.FileTypeToContentType ( string  FileType)

File type to content type

Parameters
FileTypeFile type
Returns
Content type

Definition at line 107 of file Manager.cs.

T Utilities.IO.Serializers.Manager.Serialize< T > ( object  Object,
Type  ObjectType,
string  ContentType = "application/json" 
)

Serializes the object based on the content type specified

Parameters
ObjectTypeObject type
ObjectObject to serialize
ContentTypeContent type (MIME type)
Template Parameters
TReturn type
Returns
The serialized object as a string

Definition at line 134 of file Manager.cs.

R Utilities.IO.Serializers.Manager.Serialize< T, R > ( Object,
string  ContentType = "application/json" 
)

Serializes the object based on the content type specified

Template Parameters
TObject type
Parameters
ObjectObject to serialize
ContentTypeContent type (MIME type)
Template Parameters
RReturn type
Returns
The serialized object as a string

Definition at line 120 of file Manager.cs.

override string Utilities.IO.Serializers.Manager.ToString ( )

Outputs information about the serializers the system is using

Returns
String version of the object

Definition at line 148 of file Manager.cs.

Property Documentation

IDictionary<string, ISerializer> Utilities.IO.Serializers.Manager.Serializers
getprotected

Serializers

Definition at line 57 of file Manager.cs.


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