C# Class Tempest.TypeMap

Represents a map of Types to identifiers for shorter bitstream references.
Inheritance: ISerializable
ファイルを表示 Open project: ermau/Tempest Class Usage Examples

Public Methods

Method Description
Deserialize ( ISerializationContext context, IValueReader reader ) : void
GetTypeId ( Type type, ushort &id ) : bool

Attempts to get the id of the type, or assigns a new one.

Serialize ( ISerializationContext context, IValueWriter writer ) : void
TryGetNewTypes ( ushort>.IList &types ) : bool

Gets the Types and their IDs that have been added since TryGetNewTypes was last called.

TryGetType ( ushort id, Type &type ) : bool

Attempts to get the type for id.

TypeMap ( ) : System
TypeMap ( ushort>.IDictionary mapping ) : System

Private Methods

Method Description
TypeMap ( ushort>.Dictionary mapping ) : System

Method Details

Deserialize() public method

public Deserialize ( ISerializationContext context, IValueReader reader ) : void
context ISerializationContext
reader IValueReader
return void

GetTypeId() public method

Attempts to get the id of the type, or assigns a new one.
is null.
public GetTypeId ( Type type, ushort &id ) : bool
type System.Type The type to lookup the for.
id ushort The id of the .
return bool

Serialize() public method

public Serialize ( ISerializationContext context, IValueWriter writer ) : void
context ISerializationContext
writer IValueWriter
return void

TryGetNewTypes() public method

Gets the Types and their IDs that have been added since TryGetNewTypes was last called.
public TryGetNewTypes ( ushort>.IList &types ) : bool
types ushort>.IList
return bool

TryGetType() public method

Attempts to get the type for id.
public TryGetType ( ushort id, Type &type ) : bool
id ushort The id to search for.
type System.Type The type, if found.
return bool

TypeMap() public method

public TypeMap ( ) : System
return System

TypeMap() public method

public TypeMap ( ushort>.IDictionary mapping ) : System
mapping ushort>.IDictionary
return System