TcHmiSerializer.SerializeObject Method

Serializes the specified members of an instance of type Object to the corresponding instance of type Value 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 Value SerializeObject(
    Object obj,
    IncludeMembers members = IncludeMembers.Fields|IncludeMembers.Properties,
    BindingFlags bindingAttr = BindingFlags.Default,
    ICollection<string> ignoreElements = null,
    bool ignoreNull = false,
    uint maxDepth = 4294967295,
    bool throwException = true
)

Parameters

obj

Type: System.Object
The object to serialize.

members (Optional)

Type: TcHmiSrv.DynamicSymbols.IncludeMembers
A bitmask comprised of one or more IncludeMembers that specify which members should be included.

bindingAttr (Optional)

Type: System.Reflection.BindingFlags
A bitmask comprised of one or more 'BindingFlags' that specify how the search is conducted.

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 an empty value; 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 an empty value.

Return Value

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

Reference

TcHmiSerializer Class

TcHmiSrv.DynamicSymbols Namespace