Space Engineers
Classes | Public Member Functions | Properties | List of all members
ProtoBuf.Meta.ValueMember Class Reference

Represents a member (property/field) that is mapped to a protobuf field More...

Classes

class  Comparer
 

Public Member Functions

 ValueMember (RuntimeTypeModel model, Type parentType, int fieldNumber, MemberInfo member, Type memberType, Type itemType, Type defaultType, DataFormat dataFormat, object defaultValue)
 Creates a new ValueMember instance More...
 
void SetSpecified (MethodInfo getSpecified, MethodInfo setSpecified)
 Specifies methods for working with optional data members. More...
 

Properties

int FieldNumber [get]
 The number that identifies this member in a protobuf stream More...
 
MemberInfo Member [get]
 Gets the member (field/property) which this member relates to. More...
 
Type ItemType [get]
 Within a list / array / etc, the type of object for each item in the list (especially useful with ArrayList) More...
 
Type MemberType [get]
 The underlying type of the member More...
 
Type DefaultType [get]
 For abstract types (IList etc), the type of concrete object to create (if required) More...
 
Type ParentType [get]
 The type the defines the member More...
 
object DefaultValue [get, set]
 The default value of the item (members with this value will not be serialized) More...
 
DataFormat DataFormat [get, set]
 Specifies the rules used to process the field; this is used to determine the most appropriate wite-type, but also to describe subtypes within that wire-type (such as SignedVariant) More...
 
bool IsStrict [get, set]
 Indicates whether this field should follow strict encoding rules; this means (for example) that if a "fixed32" is encountered when "variant" is defined, then it will fail (throw an exception) when parsing. Note that when serializing the defined type is always used. More...
 
bool IsPacked [get, set]
 Indicates whether this field should use packed encoding (which can save lots of space for repeated primitive values). This option only applies to list/array data of primitive types (int, double, etc). More...
 
bool OverwriteList [get, set]
 Indicates whether this field should repace existing values (the default is false, meaning append). This option only applies to list/array data. More...
 
bool IsRequired [get, set]
 Indicates whether this field is mandatory. More...
 
bool AsReference [get, set]
 Enables full object-tracking/full-graph support. More...
 
bool DynamicType [get, set]
 Embeds the type information into the stream, allowing usage with types not known in advance. More...
 
string Name [get]
 Gets the logical name for this member in the schema (this is not critical for binary serialization, but may be used when inferring a schema). More...
 
bool SupportNull [get, set]
 Should lists have extended support for null values? Note this makes the serialization less efficient. More...
 

Detailed Description

Represents a member (property/field) that is mapped to a protobuf field

Definition at line 20 of file ValueMember.cs.

Constructor & Destructor Documentation

ProtoBuf.Meta.ValueMember.ValueMember ( RuntimeTypeModel  model,
Type  parentType,
int  fieldNumber,
MemberInfo  member,
Type  memberType,
Type  itemType,
Type  defaultType,
DataFormat  dataFormat,
object  defaultValue 
)
inline

Creates a new ValueMember instance

Definition at line 67 of file ValueMember.cs.

Member Function Documentation

void ProtoBuf.Meta.ValueMember.SetSpecified ( MethodInfo  getSpecified,
MethodInfo  setSpecified 
)
inline

Specifies methods for working with optional data members.

Parameters
getSpecifiedProvides a method (null for none) to query whether this member should be serialized; it must be of the form "bool {Method}()". The member is only serialized if the method returns true.
setSpecifiedProvides a method (null for none) to indicate that a member was deserialized; it must be of the form "void {Method}(bool)", and will be called with "true" when data is found.

Definition at line 277 of file ValueMember.cs.

Property Documentation

bool ProtoBuf.Meta.ValueMember.AsReference
getset

Enables full object-tracking/full-graph support.

Definition at line 252 of file ValueMember.cs.

DataFormat ProtoBuf.Meta.ValueMember.DataFormat
getset

Specifies the rules used to process the field; this is used to determine the most appropriate wite-type, but also to describe subtypes within that wire-type (such as SignedVariant)

Definition at line 202 of file ValueMember.cs.

Type ProtoBuf.Meta.ValueMember.DefaultType
get

For abstract types (IList etc), the type of concrete object to create (if required)

Definition at line 45 of file ValueMember.cs.

object ProtoBuf.Meta.ValueMember.DefaultValue
getset

The default value of the item (members with this value will not be serialized)

Definition at line 55 of file ValueMember.cs.

bool ProtoBuf.Meta.ValueMember.DynamicType
getset

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

Definition at line 262 of file ValueMember.cs.

int ProtoBuf.Meta.ValueMember.FieldNumber
get

The number that identifies this member in a protobuf stream

Definition at line 26 of file ValueMember.cs.

bool ProtoBuf.Meta.ValueMember.IsPacked
getset

Indicates whether this field should use packed encoding (which can save lots of space for repeated primitive values). This option only applies to list/array data of primitive types (int, double, etc).

Definition at line 223 of file ValueMember.cs.

bool ProtoBuf.Meta.ValueMember.IsRequired
getset

Indicates whether this field is mandatory.

Definition at line 242 of file ValueMember.cs.

bool ProtoBuf.Meta.ValueMember.IsStrict
getset

Indicates whether this field should follow strict encoding rules; this means (for example) that if a "fixed32" is encountered when "variant" is defined, then it will fail (throw an exception) when parsing. Note that when serializing the defined type is always used.

Definition at line 213 of file ValueMember.cs.

Type ProtoBuf.Meta.ValueMember.ItemType
get

Within a list / array / etc, the type of object for each item in the list (especially useful with ArrayList)

Definition at line 37 of file ValueMember.cs.

MemberInfo ProtoBuf.Meta.ValueMember.Member
get

Gets the member (field/property) which this member relates to.

Definition at line 31 of file ValueMember.cs.

Type ProtoBuf.Meta.ValueMember.MemberType
get

The underlying type of the member

Definition at line 41 of file ValueMember.cs.

string ProtoBuf.Meta.ValueMember.Name
get

Gets the logical name for this member in the schema (this is not critical for binary serialization, but may be used when inferring a schema).

Definition at line 560 of file ValueMember.cs.

bool ProtoBuf.Meta.ValueMember.OverwriteList
getset

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

Definition at line 233 of file ValueMember.cs.

Type ProtoBuf.Meta.ValueMember.ParentType
get

The type the defines the member

Definition at line 49 of file ValueMember.cs.

bool ProtoBuf.Meta.ValueMember.SupportNull
getset

Should lists have extended support for null values? Note this makes the serialization less efficient.

Definition at line 589 of file ValueMember.cs.


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