Photon Server API
Public Member Functions | Static Public Attributes | List of all members
ExitGames.Messaging.Channels.GenericSerializer< T > Class Template Reference

An IMessageSerializer<T> that uses the IO.BinaryConverter to serialze any message type. More...

Inheritance diagram for ExitGames.Messaging.Channels.GenericSerializer< T >:
ExitGames.Messaging.Channels.IMessageSerializer< T >

Public Member Functions

Deserialize (byte[] bytes)
 Deserializes the message with the IO.BinaryConverter. More...
 
byte[] Serialize (T message)
 Serializes the message with the IO.BinaryConverter. More...
 

Static Public Attributes

static readonly GenericSerializer< T > Instance = new GenericSerializer<T>()
 The singleton. More...
 

Detailed Description

An IMessageSerializer<T> that uses the IO.BinaryConverter to serialze any message type.

Template Parameters
TThe message type.

Member Function Documentation

T ExitGames.Messaging.Channels.GenericSerializer< T >.Deserialize ( byte[]  bytes)
inline

Deserializes the message with the IO.BinaryConverter.

Parameters
bytesThe serialized message.
Returns
A deserialized message.

Implements ExitGames.Messaging.Channels.IMessageSerializer< T >.

byte [] ExitGames.Messaging.Channels.GenericSerializer< T >.Serialize ( message)
inline

Serializes the message with the IO.BinaryConverter.

Parameters
messageThe message.
Returns
A serialized message.

Implements ExitGames.Messaging.Channels.IMessageSerializer< T >.

Member Data Documentation

The singleton.