Space Engineers
Namespaces | Classes | Enumerations
Package ProtoBuf

Namespaces

package  Meta
 
package  Serializers
 

Classes

class  BclHelpers
 Provides support for common .NET types that do not have a direct representation in protobuf, using the definitions from bcl.proto
 
class  BufferExtension
 Provides a simple buffer-based implementation of an extension object. More...
 
class  BufferPool
 
class  Extensible
 Simple base class for supporting unexpected fields allowing for loss-less round-tips/merge, even if the data is not understod. The additional fields are (by default) stored in-memory in a buffer. More...
 
class  ExtensibleUtil
 This class acts as an internal wrapper allowing us to do a dynamic methodinfo invoke; an't put into Serializer as don't want on public API; can't put into Serializer<T> since we need to invoke accross classes, which isn't allowed in Silverlight)
 
class  Helpers
 Not all frameworks are created equal (fx1.1 vs fx2.0, micro-framework, compact-framework, silverlight, etc). This class simply wraps up a few things that would otherwise make the real code unnecessarily messy, providing fallback implementations if necessary.
 
interface  IExtensible
 Indicates that the implementing type has support for protocol-buffer extensions. More...
 
interface  IExtension
 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...
 
class  NetObjectCache
 
class  ProtoAfterDeserializationAttribute
 Specifies a method on the root-contract in an hierarchy to be invoked after deserialization. More...
 
class  ProtoAfterSerializationAttribute
 Specifies a method on the root-contract in an hierarchy to be invoked after serialization. More...
 
class  ProtoBeforeDeserializationAttribute
 Specifies a method on the root-contract in an hierarchy to be invoked before deserialization. More...
 
class  ProtoBeforeSerializationAttribute
 Specifies a method on the root-contract in an hierarchy to be invoked before serialization. More...
 
class  ProtoContractAttribute
 Indicates that a type is defined for protocol-buffer serialization. More...
 
class  ProtoEnumAttribute
 Used to define protocol-buffer specific behavior for enumerated values. More...
 
class  ProtoException
 Indicates an error during serialization/deserialization of a proto stream. More...
 
class  ProtoIgnoreAttribute
 Indicates that a member should be excluded from serialization; this is only normally used when using implict fields. More...
 
class  ProtoIncludeAttribute
 Indicates the known-types to support for an individual message. This serializes each level in the hierarchy as a nested message to retain wire-compatibility with other protocol-buffer implementations. More...
 
class  ProtoMemberAttribute
 Declares a member to be used in protocol-buffer serialization, using the given Tag. A DataFormat may be used to optimise the serialization format (for instance, using zigzag encoding for negative numbers, or fixed-length encoding for large values. More...
 
class  ProtoPartialIgnoreAttribute
 Indicates that a member should be excluded from serialization; this is only normally used when using implict fields. This allows ProtoIgnoreAttribute usage even for partial classes where the individual members are not under direct control. More...
 
class  ProtoPartialMemberAttribute
 Declares a member to be used in protocol-buffer serialization, using the given Tag and MemberName. This allows ProtoMemberAttribute usage even for partial classes where the individual members are not under direct control. A DataFormat may be used to optimise the serialization format (for instance, using zigzag encoding for negative numbers, or fixed-length encoding for large values. More...
 
class  ProtoReader
 A stateful reader, used to read a protobuf stream. Typical usage would be (sequentially) to call ReadFieldHeader and (after matching the field) an appropriate Read* method. More...
 
class  ProtoWriter
 Represents an output stream for writing protobuf data. More...
 
class  SerializationContext
 Additional information about a serialization operation More...
 
class  Serializer
 Provides protocol-buffer serialization capability for concrete, attributed types. This is a default model, but custom serializer models are also supported.
 
struct  SubItemToken
 Used to hold particulars relating to nested objects. This is opaque to the caller - simply give back the token you are given at the end of an object. More...
 

Enumerations

enum  DataFormat {
  DataFormat.Default, DataFormat.ZigZag, DataFormat.TwosComplement, DataFormat.FixedSize,
  DataFormat.Group
}
 Sub-format to use when serializing/deserializing data More...
 
enum  ImplicitFields { ImplicitFields.None = 0, ImplicitFields.AllPublic = 1, ImplicitFields.AllFields = 2 }
 Specifies the method used to infer field tags for members of the type under consideration. Tags are deduced using the invariant alphabetic sequence of the members' names; this makes implicit field tags very brittle, and susceptible to changes such as field names (normally an isolated change). More...
 
enum  PrefixStyle { PrefixStyle.None, PrefixStyle.Base128, PrefixStyle.Fixed32, PrefixStyle.Fixed32BigEndian }
 Specifies the type of prefix that should be applied to messages. More...
 
enum  MemberSerializationOptions {
  MemberSerializationOptions.None = 0, MemberSerializationOptions.Packed = 1, MemberSerializationOptions.Required = 2, MemberSerializationOptions.AsReference = 4,
  MemberSerializationOptions.DynamicType = 8, MemberSerializationOptions.OverwriteList = 16, MemberSerializationOptions.AsReferenceHasValue = 32
}
 Additional (optional) settings that control serialization of members More...
 
enum  WireType {
  WireType.None = -1, WireType.Variant = 0, WireType.Fixed64 = 1, WireType.String = 2,
  WireType.StartGroup = 3, WireType.EndGroup = 4, WireType.Fixed32 = 5, WireType.SignedVariant = WireType.Variant | (1 << 3)
}
 Indicates the encoding used to represent an individual value in a protobuf stream More...
 

Enumeration Type Documentation

Sub-format to use when serializing/deserializing data

Enumerator
Default 

Uses the default encoding for the data-type.

ZigZag 

When applied to signed integer-based data (including Decimal), this indicates that zigzag variant encoding will be used. This means that values with small magnitude (regardless of sign) take a small amount of space to encode.

TwosComplement 

When applied to signed integer-based data (including Decimal), this indicates that two's-complement variant encoding will be used. This means that any -ve number will take 10 bytes (even for 32-bit), so should only be used for compatibility.

FixedSize 

When applied to signed integer-based data (including Decimal), this indicates that a fixed amount of space will be used.

Group 

When applied to a sub-message, indicates that the value should be treated as group-delimited.

Definition at line 8 of file DataFormat.cs.

Specifies the method used to infer field tags for members of the type under consideration. Tags are deduced using the invariant alphabetic sequence of the members' names; this makes implicit field tags very brittle, and susceptible to changes such as field names (normally an isolated change).

Enumerator
None 

No members are serialized implicitly; all members require a suitable attribute such as [ProtoMember]. This is the recmomended mode for most scenarios.

AllPublic 

Public properties and fields are eligible for implicit serialization; this treats the public API as a contract. Ordering beings from ImplicitFirstTag.

AllFields 

Public and non-public fields are eligible for implicit serialization; this acts as a state/implementation serializer. Ordering beings from ImplicitFirstTag.

Definition at line 13 of file ImplicitFields.cs.

Additional (optional) settings that control serialization of members

Enumerator
None 

Default; no additional options

Packed 

Indicates that repeated elements should use packed (length-prefixed) encoding

Required 

Indicates that the given item is required

AsReference 

Enables full object-tracking/full-graph support

DynamicType 

Embeds the type information into the stream, allowing usage with types not known in advance

OverwriteList 

Indicates whether this field should repace existing values (the default is false, meaning append). This option only applies to list/array data.

AsReferenceHasValue 

Determines whether the types AsReferenceDefault value is used, or whether this member's AsReference should be used

Definition at line 197 of file ProtoMemberAttribute.cs.

Specifies the type of prefix that should be applied to messages.

Enumerator
None 

No length prefix is applied to the data; the data is terminated only be the end of the stream.

Base128 

A base-128 length prefix is applied to the data (efficient for short messages).

Fixed32 

A fixed-length (little-endian) length prefix is applied to the data (useful for compatibility).

Fixed32BigEndian 

A fixed-length (big-endian) length prefix is applied to the data (useful for compatibility).

Definition at line 8 of file PrefixStyle.cs.

Indicates the encoding used to represent an individual value in a protobuf stream

Enumerator
None 

Represents an error condition

Variant 

Base-128 variant-length encoding

Fixed64 

Fixed-length 8-byte encoding

String 

Length-variant-prefixed encoding

StartGroup 

Indicates the start of a group

EndGroup 

Indicates the end of a group

Fixed32 

Fixed-length 4-byte encoding

10

SignedVariant 

This is not a formal wire-type in the "protocol buffers" spec, but denotes a variant integer that should be interpreted using zig-zag semantics (so -ve numbers aren't a significant overhead)

Definition at line 7 of file WireType.cs.