Class PrimitiveTypeInfo
SBE template primitive type description.
Namespace: OnixS.SimpleBinaryEncoding.Templates
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public class PrimitiveTypeInfo : TypeInfo
Constructors
PrimitiveTypeInfo(String, PrimitiveType)
Constructor.
Declaration
public PrimitiveTypeInfo(string name, PrimitiveType primitiveType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Type name. |
PrimitiveType | primitiveType | Underlying primitive type. |
PrimitiveTypeInfo(String, PrimitiveType, Presence, Object, Object, Object, Object)
Constructor.
Declaration
public PrimitiveTypeInfo(string name, PrimitiveType primitiveType, Presence presence, object nullValue, object minValue, object maxValue, object constantValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Type name. |
PrimitiveType | primitiveType | Underlying primitive type. |
Presence | presence | Type presence. |
System.Object | nullValue | A null value for optional fields. |
System.Object | minValue | Minimum allowed value. |
System.Object | maxValue | Maximum allowed value. |
System.Object | constantValue | Constant value for constant fields. |
PrimitiveTypeInfo(String, PrimitiveType, Presence, Object, Object, Object, String)
Constructor.
Declaration
public PrimitiveTypeInfo(string name, PrimitiveType primitiveType, Presence presence, object nullValue, object minValue, object maxValue, string constantValueRef)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Type name. |
PrimitiveType | primitiveType | Underlying primitive type. |
Presence | presence | Type presence. |
System.Object | nullValue | A null value for optional fields. |
System.Object | minValue | Minimum allowed value. |
System.Object | maxValue | Maximum allowed value. |
System.String | constantValueRef | Constant value for constant fields. |
PrimitiveTypeInfo(String, PrimitiveType, Object, Object, Object, Object)
Constructor.
Declaration
public PrimitiveTypeInfo(string name, PrimitiveType primitiveType, object nullValue, object minValue, object maxValue, object constantValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Type name. |
PrimitiveType | primitiveType | Underlying primitive type. |
System.Object | nullValue | A null value for optional fields. |
System.Object | minValue | Minimum allowed value. |
System.Object | maxValue | Maximum allowed value. |
System.Object | constantValue | Constant value for constant fields. |
Properties
ConstantValue
Gets constant value for constant fields.
Declaration
public object ConstantValue { get; }
Property Value
Type | Description |
---|---|
System.Object |
ConstantValueRef
Gets constant value reference for constant fields.
Declaration
public string ConstantValueRef { get; }
Property Value
Type | Description |
---|---|
System.String |
Encoding
Encoding name used to encode character strings.
Declaration
public string Encoding { get; }
Property Value
Type | Description |
---|---|
System.String |
Length
Gets or sets encoded type length.
Declaration
public ushort Length { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
MaxValue
Gets maximum allowed value.
Declaration
public object MaxValue { get; }
Property Value
Type | Description |
---|---|
System.Object |
MinValue
Gets minimum allowed value.
Declaration
public object MinValue { get; }
Property Value
Type | Description |
---|---|
System.Object |
NullValue
Gets a null value for optional fields.
Declaration
public object NullValue { get; }
Property Value
Type | Description |
---|---|
System.Object |
Offset
Gets field offset for fields of the composite type.
Declaration
public int Offset { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PrimitiveType
Gets underlying primitive type.
Declaration
public PrimitiveType PrimitiveType { get; }
Property Value
Type | Description |
---|---|
PrimitiveType |
VariableLength
Gets or sets if the type has variable length.
Declaration
public bool VariableLength { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |