TcHmiSerializer.CreateObject.T. Method (Value, Boolean, Boolean, ICollection.String., Boolean, UInt32, Boolean)

Serializes an instance of type Value to the corresponding instance of the given type parameter with the specified BindingFlags without the ignored elements up to the specified serialization depth.

Namespace:  TcHmiSrv.DynamicSymbols
Assembly:  TcHmiSrvExtNet.DynamicSymbols (in TcHmiSrvExtNet.DynamicSymbols.dll) Version: 2.0.0.0

Syntax

C#

public static T CreateObject<T>(
    Value value,
    bool skipAbstractOrInterface = false,
    bool allowChangeType = false,
    ICollection<string> ignoreElements = null,
    bool ignoreNull = false,
    uint maxDepth = 4294967295,
    bool throwException = true
)

Parameters

value

Type: TcHmiSrv.Value
The value to serialize.

skipAbstractOrInterface (Optional)

Type: System.Boolean
true to skip abstract classes and interfaces; false to throw an exception.

allowChangeType (Optional)

Type: System.Boolean
true to allow conversions between different built-in data types (e.g. int to double, bool to string or vice versa) by using ChangeType(Object, Type); false to allow only conversions between related built-in data types (e.g. short to int or float to double).

ignoreElements (Optional)

Type: System.Collections.Generic.ICollection.String.
A collection of elements that should be ignored.

ignoreNull (Optional)

Type: System.Boolean
true to ignore null values and return null; false to throw an exception.

maxDepth (Optional)

Type: System.UInt32
The maximum serialization depth.

throwException (Optional)

Type: System.Boolean
true to throw an exception after the maximum serialization depth has been reached; false to return null.

Type Parameters

T

The type of the object that will be returned.

Return Value

Type: T
An instance of the specified type that matches the specified Value.

Reference

TcHmiSerializer Class

CreateObject Overload

TcHmiSrv.DynamicSymbols Namespace