Extension methods on IMessage and IMessage{T}.
Public static functions |
|
---|---|
MergeDelimitedFrom(this IMessage message, Stream input)
|
void
Merges length-delimited data from the given stream into an existing message.
|
MergeFrom(this IMessage message, byte[] data)
|
void
Merges data from the given byte array into an existing message.
|
MergeFrom(this IMessage message, ByteString data)
|
void
Merges data from the given byte string into an existing message.
|
MergeFrom(this IMessage message, Stream input)
|
void
Merges data from the given stream into an existing message.
|
ToByteArray(this IMessage message)
|
byte[]
Converts the given message into a byte array in protobuf encoding.
|
ToByteString(this IMessage message)
|
Converts the given message into a byte string in protobuf encoding.
|
WriteDelimitedTo(this IMessage message, Stream output)
|
void
Writes the length and then data of the given message to a stream.
|
WriteTo(this IMessage message, Stream output)
|
void
Writes the given message data to the given stream in protobuf encoding.
|
void MergeDelimitedFrom( this IMessage message, Stream input )
Merges length-delimited data from the given stream into an existing message.
The stream is expected to contain a length and then the data. Only the amount of data specified by the length will be consumed.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
void MergeFrom( this IMessage message, byte[] data )
Merges data from the given byte array into an existing message.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
void MergeFrom( this IMessage message, ByteString data )
Merges data from the given byte string into an existing message.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
void MergeFrom( this IMessage message, Stream input )
Merges data from the given stream into an existing message.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
byte[] ToByteArray( this IMessage message )
Converts the given message into a byte array in protobuf encoding.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The message data as a byte array.
|
ByteString ToByteString( this IMessage message )
Converts the given message into a byte string in protobuf encoding.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The message data as a byte string.
|
void WriteDelimitedTo( this IMessage message, Stream output )
Writes the length and then data of the given message to a stream.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
void WriteTo( this IMessage message, Stream output )
Writes the given message data to the given stream in protobuf encoding.
Details | |||||
---|---|---|---|---|---|
Parameters |
|