C# Class KRPC.Client.Encoder

ファイルを表示 Open project: krpc/krpc

Public Methods

Method Description
Encode ( object value, Type type ) : ByteString

Encode an object of the given type using the protocol buffer encoding scheme. Should not be called directly. This interface is used by service client stubs.

EncodeClientName ( string name ) : byte[]

Encode a client name.

Private Methods

Method Description
Decode ( ByteString value, Type type, IConnection client ) : object
DecodeDictionary ( CodedInputStream stream, Type type, IConnection client ) : object
DecodeList ( CodedInputStream stream, Type type, IConnection client ) : object
DecodeSet ( CodedInputStream stream, Type type, IConnection client ) : object
DecodeTuple ( CodedInputStream stream, Type type, IConnection client ) : object
EncodeObject ( object value, Type type, MemoryStream buffer, CodedOutputStream stream ) : ByteString
IsAClassType ( Type type ) : bool
IsACollectionType ( Type type ) : bool
IsADictionaryType ( Type type ) : bool
IsAGenericType ( Type type, Type genericType ) : bool
IsAListType ( Type type ) : bool
IsAMessageType ( Type type ) : bool
IsASetType ( Type type ) : bool
IsATupleType ( Type type ) : bool
WriteDictionary ( object value, Type type, Stream stream ) : void
WriteList ( object value, Type type, Stream stream ) : void
WriteSet ( object value, Type type, Stream stream ) : void
WriteTuple ( object value, Type type, Stream stream ) : void

Method Details

Encode() public static method

Encode an object of the given type using the protocol buffer encoding scheme. Should not be called directly. This interface is used by service client stubs.
public static Encode ( object value, Type type ) : ByteString
value object
type System.Type
return ByteString

EncodeClientName() public static method

Encode a client name.
public static EncodeClientName ( string name ) : byte[]
name string
return byte[]