Space Engineers
|
Represents a type at runtime for use with protobuf, allowing the field mappings (etc) to be defined More...
Classes | |
class | Comparer |
Public Member Functions | |
override string | ToString () |
Get the name of the type being represented More... | |
MetaType | AddSubType (int fieldNumber, Type derivedType) |
Adds a known sub-type to the inheritance model More... | |
MetaType | AddSubType (int fieldNumber, Type derivedType, DataFormat dataFormat) |
Adds a known sub-type to the inheritance model More... | |
MetaType | SetCallbacks (MethodInfo beforeSerialize, MethodInfo afterSerialize, MethodInfo beforeDeserialize, MethodInfo afterDeserialize) |
Assigns the callbacks to use during serialiation/deserialization. More... | |
MetaType | SetCallbacks (string beforeSerialize, string afterSerialize, string beforeDeserialize, string afterDeserialize) |
Assigns the callbacks to use during serialiation/deserialization. More... | |
MetaType | SetFactory (MethodInfo factory) |
Designate a factory-method to use to create instances of this type More... | |
MetaType | SetFactory (string factory) |
Designate a factory-method to use to create instances of this type More... | |
MetaType | Add (int fieldNumber, string memberName) |
Adds a member (by name) to the MetaType More... | |
ValueMember | AddField (int fieldNumber, string memberName) |
Adds a member (by name) to the MetaType, returning the ValueMember rather than the fluent API. This is otherwise identical to Add. More... | |
MetaType | Add (string memberName) |
Adds a member (by name) to the MetaType More... | |
void | SetSurrogate (Type surrogateType) |
Performs serialization of this type via a surrogate; all other serialization options are ignored and handled by the surrogate's configuration. More... | |
MetaType | Add (params string[] memberNames) |
Adds a set of members (by name) to the MetaType More... | |
MetaType | Add (int fieldNumber, string memberName, object defaultValue) |
Adds a member (by name) to the MetaType More... | |
MetaType | Add (int fieldNumber, string memberName, Type itemType, Type defaultType) |
Adds a member (by name) to the MetaType, including an itemType and defaultType for representing lists More... | |
ValueMember | AddField (int fieldNumber, string memberName, Type itemType, Type defaultType) |
Adds a member (by name) to the MetaType, including an itemType and defaultType for representing lists, returning the ValueMember rather than the fluent API. This is otherwise identical to Add. More... | |
ValueMember[] | GetFields () |
Returns the ValueMember instances associated with this type More... | |
SubType[] | GetSubtypes () |
Returns the SubType instances associated with this type More... | |
Properties | |
MetaType | BaseType [get] |
Gets the base-type for this type More... | |
bool | IncludeSerializerMethod [get, set] |
When used to compile a model, should public serialization/deserialzation methods be included for this type? More... | |
bool | AsReferenceDefault [get, set] |
Should this type be treated as a reference by default? More... | |
bool | HasCallbacks [get] |
Indicates whether the current type has defined callbacks More... | |
bool | HasSubtypes [get] |
Indicates whether the current type has defined subtypes More... | |
CallbackSet | Callbacks [get] |
Returns the set of callbacks defined for this type More... | |
string | Name [get, set] |
Gets or sets the name of this contract. More... | |
Type | Type [get] |
The runtime type that the meta-type represents More... | |
bool | UseConstructor [get, set] |
Gets or sets whether the type should use a parameterless constructor (the default), or whether the type should skip the constructor completely. This option is not supported on compact-framework. More... | |
Type | ConstructType [get, set] |
The concrete type to create when a new instance of this type is needed; this may be useful when dealing with dynamic proxies, or with interface-based APIs More... | |
ValueMember | this[int fieldNumber] [get] |
Returns the ValueMember that matchs a given field number, or null if not found More... | |
ValueMember | this[MemberInfo member] [get] |
Returns the ValueMember that matchs a given member (property/field), or null if not found More... | |
bool | EnumPassthru [get, set] |
Gets or sets a value indicating that an enum should be treated directly as an int/short/etc, rather than enforcing .proto enum rules. This is useful in particul for [Flags] enums. More... | |
bool | IgnoreListHandling [get, set] |
Gets or sets a value indicating that this type should NOT be treated as a list, even if it has familiar list-like characteristics (enumerable, add, etc) More... | |
Properties inherited from ProtoBuf.Serializers.ISerializerProxy | |
IProtoSerializer | Serializer [get] |
Represents a type at runtime for use with protobuf, allowing the field mappings (etc) to be defined
Definition at line 28 of file MetaType.cs.
|
inline |
Adds a member (by name) to the MetaType
Definition at line 1196 of file MetaType.cs.
|
inline |
Adds a member (by name) to the MetaType
Definition at line 1236 of file MetaType.cs.
|
inline |
Adds a set of members (by name) to the MetaType
Definition at line 1307 of file MetaType.cs.
|
inline |
Adds a member (by name) to the MetaType
Definition at line 1321 of file MetaType.cs.
|
inline |
Adds a member (by name) to the MetaType, including an itemType and defaultType for representing lists
Definition at line 1330 of file MetaType.cs.
|
inline |
Adds a member (by name) to the MetaType, returning the ValueMember rather than the fluent API. This is otherwise identical to Add.
Definition at line 1205 of file MetaType.cs.
|
inline |
Adds a member (by name) to the MetaType, including an itemType and defaultType for representing lists, returning the ValueMember rather than the fluent API. This is otherwise identical to Add.
Definition at line 1340 of file MetaType.cs.
Adds a known sub-type to the inheritance model
Definition at line 101 of file MetaType.cs.
|
inline |
Adds a known sub-type to the inheritance model
Definition at line 108 of file MetaType.cs.
|
inline |
Returns the ValueMember instances associated with this type
Definition at line 1517 of file MetaType.cs.
|
inline |
Returns the SubType instances associated with this type
Definition at line 1527 of file MetaType.cs.
|
inline |
Assigns the callbacks to use during serialiation/deserialization.
beforeSerialize | The method (or null) called before serialization begins. |
afterSerialize | The method (or null) called when serialization is complete. |
beforeDeserialize | The method (or null) called before deserialization begins (or when a new instance is created during deserialization). |
afterDeserialize | The method (or null) called when deserialization is complete. |
Definition at line 202 of file MetaType.cs.
|
inline |
Assigns the callbacks to use during serialiation/deserialization.
beforeSerialize | The name of the method (or null) called before serialization begins. |
afterSerialize | The name of the method (or null) called when serialization is complete. |
beforeDeserialize | The name of the method (or null) called before deserialization begins (or when a new instance is created during deserialization). |
afterDeserialize | The name of the method (or null) called when deserialization is complete. |
Definition at line 219 of file MetaType.cs.
|
inline |
Designate a factory-method to use to create instances of this type
Definition at line 294 of file MetaType.cs.
|
inline |
Designate a factory-method to use to create instances of this type
Definition at line 307 of file MetaType.cs.
|
inline |
Performs serialization of this type via a surrogate; all other serialization options are ignored and handled by the surrogate's configuration.
Definition at line 1247 of file MetaType.cs.
|
inline |
Get the name of the type being represented
Definition at line 56 of file MetaType.cs.
|
getset |
Should this type be treated as a reference by default?
Definition at line 84 of file MetaType.cs.
|
get |
Gets the base-type for this type
Definition at line 65 of file MetaType.cs.
|
get |
Returns the set of callbacks defined for this type
Definition at line 175 of file MetaType.cs.
|
getset |
The concrete type to create when a new instance of this type is needed; this may be useful when dealing with dynamic proxies, or with interface-based APIs
Definition at line 1224 of file MetaType.cs.
|
getset |
Gets or sets a value indicating that an enum should be treated directly as an int/short/etc, rather than enforcing .proto enum rules. This is useful in particul for [Flags] enums.
Definition at line 1590 of file MetaType.cs.
|
get |
Indicates whether the current type has defined callbacks
Definition at line 159 of file MetaType.cs.
|
get |
Indicates whether the current type has defined subtypes
Definition at line 167 of file MetaType.cs.
|
getset |
Gets or sets a value indicating that this type should NOT be treated as a list, even if it has familiar list-like characteristics (enumerable, add, etc)
Definition at line 1600 of file MetaType.cs.
|
getset |
When used to compile a model, should public serialization/deserialzation methods be included for this type?
Definition at line 75 of file MetaType.cs.
|
getset |
Gets or sets the name of this contract.
Definition at line 278 of file MetaType.cs.
|
get |
Returns the ValueMember that matchs a given field number, or null if not found
Definition at line 1487 of file MetaType.cs.
|
get |
Returns the ValueMember that matchs a given member (property/field), or null if not found
Definition at line 1501 of file MetaType.cs.
|
get |
The runtime type that the meta-type represents
Definition at line 365 of file MetaType.cs.
|
getset |
Gets or sets whether the type should use a parameterless constructor (the default), or whether the type should skip the constructor completely. This option is not supported on compact-framework.
Definition at line 1215 of file MetaType.cs.