Factory methods for FieldCodec{T}.
Public static functions |
|
---|---|
ForBool(uint tag)
|
FieldCodec< bool>
Retrieves a codec suitable for a bool field with the given tag.
|
ForBytes(uint tag)
|
FieldCodec< ByteString>
Retrieves a codec suitable for a bytes field with the given tag.
|
ForClassWrapper< T>(uint tag)
|
FieldCodec< T>
Creates a codec for a wrapper type of a class - which must be string or ByteString.
|
ForDouble(uint tag)
|
FieldCodec< double>
Retrieves a codec suitable for a double field with the given tag.
|
ForEnum< T>(uint tag, Func< T, int> toInt32, Func< int, T> fromInt32)
|
FieldCodec< T>
Retrieves a codec suitable for an enum field with the given tag.
|
ForFixed32(uint tag)
|
FieldCodec< uint>
Retrieves a codec suitable for a fixed32 field with the given tag.
|
ForFixed64(uint tag)
|
FieldCodec< ulong>
Retrieves a codec suitable for a fixed64 field with the given tag.
|
ForFloat(uint tag)
|
FieldCodec< float>
Retrieves a codec suitable for a float field with the given tag.
|
ForInt32(uint tag)
|
FieldCodec< int>
Retrieves a codec suitable for an int32 field with the given tag.
|
ForInt64(uint tag)
|
FieldCodec< long>
Retrieves a codec suitable for an int64 field with the given tag.
|
ForMessage< T>(uint tag, MessageParser < T> parser)
|
FieldCodec< T>
Retrieves a codec suitable for a message field with the given tag.
|
ForSFixed32(uint tag)
|
FieldCodec< int>
Retrieves a codec suitable for an sfixed32 field with the given tag.
|
ForSFixed64(uint tag)
|
FieldCodec< long>
Retrieves a codec suitable for an sfixed64 field with the given tag.
|
ForSInt32(uint tag)
|
FieldCodec< int>
Retrieves a codec suitable for an sint32 field with the given tag.
|
ForSInt64(uint tag)
|
FieldCodec< long>
Retrieves a codec suitable for an sint64 field with the given tag.
|
ForString(uint tag)
|
FieldCodec< string>
Retrieves a codec suitable for a string field with the given tag.
|
ForStructWrapper< T>(uint tag)
|
FieldCodec< T?>
Creates a codec for a wrapper type of a struct - which must be Int32, Int64, UInt32, UInt64, Bool, Single or Double.
|
ForUInt32(uint tag)
|
FieldCodec< uint>
Retrieves a codec suitable for a uint32 field with the given tag.
|
ForUInt64(uint tag)
|
FieldCodec< ulong>
Retrieves a codec suitable for a uint64 field with the given tag.
|
FieldCodec< bool> ForBool( uint tag )
Retrieves a codec suitable for a bool field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< ByteString> ForBytes( uint tag )
Retrieves a codec suitable for a bytes field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< T> ForClassWrapper< T>( uint tag )
Creates a codec for a wrapper type of a class - which must be string or ByteString.
FieldCodec< double> ForDouble( uint tag )
Retrieves a codec suitable for a double field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< T> ForEnum< T>( uint tag, Func< T, int> toInt32, Func< int, T> fromInt32 )
Retrieves a codec suitable for an enum field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
toInt32
A conversion function from Int32 to the enum type.
fromInt32
A conversion function from the enum type to Int32.
|
Returns |
A codec for the given tag.
|
FieldCodec< uint> ForFixed32( uint tag )
Retrieves a codec suitable for a fixed32 field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< ulong> ForFixed64( uint tag )
Retrieves a codec suitable for a fixed64 field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< float> ForFloat( uint tag )
Retrieves a codec suitable for a float field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< int> ForInt32( uint tag )
Retrieves a codec suitable for an int32 field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< long> ForInt64( uint tag )
Retrieves a codec suitable for an int64 field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< T> ForMessage< T>( uint tag, MessageParser < T> parser )
Retrieves a codec suitable for a message field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
parser
A parser to use for the message type.
|
Returns |
A codec for the given tag.
|
FieldCodec< int> ForSFixed32( uint tag )
Retrieves a codec suitable for an sfixed32 field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< long> ForSFixed64( uint tag )
Retrieves a codec suitable for an sfixed64 field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< int> ForSInt32( uint tag )
Retrieves a codec suitable for an sint32 field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< long> ForSInt64( uint tag )
Retrieves a codec suitable for an sint64 field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< string> ForString( uint tag )
Retrieves a codec suitable for a string field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< T?> ForStructWrapper< T>( uint tag )
Creates a codec for a wrapper type of a struct - which must be Int32, Int64, UInt32, UInt64, Bool, Single or Double.
FieldCodec< uint> ForUInt32( uint tag )
Retrieves a codec suitable for a uint32 field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|
FieldCodec< ulong> ForUInt64( uint tag )
Retrieves a codec suitable for a uint64 field with the given tag.
Details | |
---|---|
Parameters |
tag
The tag.
|
Returns |
A codec for the given tag.
|