C# Class Akka.Serialization.Serializer

Class Serializer.
显示文件 Open project: rogeralsing/akka.net Class Usage Examples

Protected Properties

Property Type Description
system ExtendedActorSystem

Public Methods

Method Description
FromBinary ( byte bytes, Type type ) : object

Deserializes a byte array into an object of type type.

Serializer ( ExtendedActorSystem system ) : System

Initializes a new instance of the Serializer class.

ToBinary ( object obj ) : byte[]

Serializes the given object into a byte array

ToBinaryWithAddress ( Akka.Actor.Address address, object obj ) : byte[]

Serializes the given object into a byte array and uses the given address to decorate serialized ActorRef's

Protected Methods

Method Description
TypeQualifiedNameForManifest ( Type type ) : string

Utility to be used by implementors to create a manifest from the type. The manifest is used to look up the type on deserialization. Returns the type qualified name including namespace and assembly, but not assembly version.

See Type.GetType(string) for details on how a type is looked up from a name. In particular, if the (partial) assembly name is not included only the assembly calling Type.GetType(string) is searched. If the (partial) assembly name is included, it searches in the specified assembly.

Method Details

FromBinary() public abstract method

Deserializes a byte array into an object of type type.
public abstract FromBinary ( byte bytes, Type type ) : object
bytes byte The array containing the serialized object
type System.Type The type of object contained in the array
return object

Serializer() public method

Initializes a new instance of the Serializer class.
public Serializer ( ExtendedActorSystem system ) : System
system ExtendedActorSystem The actor system to associate with this serializer.
return System

ToBinary() public abstract method

Serializes the given object into a byte array
public abstract ToBinary ( object obj ) : byte[]
obj object The object to serialize
return byte[]

ToBinaryWithAddress() public method

Serializes the given object into a byte array and uses the given address to decorate serialized ActorRef's
public ToBinaryWithAddress ( Akka.Actor.Address address, object obj ) : byte[]
address Akka.Actor.Address The address to use when serializing local ActorRef´s
obj object The object to serialize
return byte[]

TypeQualifiedNameForManifest() protected static method

Utility to be used by implementors to create a manifest from the type. The manifest is used to look up the type on deserialization. Returns the type qualified name including namespace and assembly, but not assembly version.
See Type.GetType(string) for details on how a type is looked up from a name. In particular, if the (partial) assembly name is not included only the assembly calling Type.GetType(string) is searched. If the (partial) assembly name is included, it searches in the specified assembly.
protected static TypeQualifiedNameForManifest ( Type type ) : string
type System.Type
return string

Property Details

system protected_oe property

The actor system to associate with this serializer.
protected ExtendedActorSystem system
return ExtendedActorSystem