Space Engineers
Public Member Functions | List of all members
ProtoBuf.IExtension Interface Reference

Provides addition capability for supporting unexpected fields during protocol-buffer serialization/deserialization. This allows for loss-less round-trip/merge, even when the data is not fully understood. More...

Inheritance diagram for ProtoBuf.IExtension:
ProtoBuf.BufferExtension

Public Member Functions

Stream BeginAppend ()
 Requests a stream into which any unexpected fields can be persisted. More...
 
void EndAppend (Stream stream, bool commit)
 Indicates that all unexpected fields have now been stored. The implementing class is responsible for closing the stream. If "commit" is not true the data may be discarded. More...
 
Stream BeginQuery ()
 Requests a stream of the unexpected fields previously stored. More...
 
void EndQuery (Stream stream)
 Indicates that all unexpected fields have now been read. The implementing class is responsible for closing the stream. More...
 
int GetLength ()
 Requests the length of the raw binary stream; this is used when serializing sub-entities to indicate the expected size. More...
 

Detailed Description

Provides addition capability for supporting unexpected fields during protocol-buffer serialization/deserialization. This allows for loss-less round-trip/merge, even when the data is not fully understood.

Definition at line 11 of file IExtension.cs.

Member Function Documentation

Stream ProtoBuf.IExtension.BeginAppend ( )

Requests a stream into which any unexpected fields can be persisted.

Returns
A new stream suitable for storing data.
Stream ProtoBuf.IExtension.BeginQuery ( )

Requests a stream of the unexpected fields previously stored.

Returns
A prepared stream of the unexpected fields.
void ProtoBuf.IExtension.EndAppend ( Stream  stream,
bool  commit 
)

Indicates that all unexpected fields have now been stored. The implementing class is responsible for closing the stream. If "commit" is not true the data may be discarded.

Parameters
streamThe stream originally obtained by BeginAppend.
commitTrue if the append operation completed successfully.
void ProtoBuf.IExtension.EndQuery ( Stream  stream)

Indicates that all unexpected fields have now been read. The implementing class is responsible for closing the stream.

Parameters
streamThe stream originally obtained by BeginQuery.
int ProtoBuf.IExtension.GetLength ( )

Requests the length of the raw binary stream; this is used when serializing sub-entities to indicate the expected size.

Returns
The length of the binary stream representing unexpected data.

The documentation for this interface was generated from the following file: