As400Program.ObjectToParm Method

Estimated reading time: 4 minutes

Definition

Namespace: ASNA.DataGate.Client
Assembly: ASNA.QSys.DataGate.Client.dll

Converts the specified object to a parameter of the specified type.

Overloads

Signature Description
ObjectToParm(void ObjectToParm(ProgParm parameter, object value, int element)) Converts the specified object to a parameter of the specified type.
ObjectToParm(void ObjectToParm(ProgParm parameter, object value)) Converts the specified object to a parameter.
ObjectToParm(void ObjectToParm(object value, string parameterName, Int32[] elementIndices)) Converts the specified object to a parameter of the specified name and element indices.
ObjectToParm(void ObjectToParm(object value, string parameterName)) Converts the specified object to a parameter of the specified name.

void ObjectToParm(ProgParm parameter, object value, int element)

Converts the specified object to a parameter of the specified type.

Remarks

This method converts the specified object to a parameter of the specified type in the ASNA DataGate client. It checks if the provided parameter is null or has no metadata, and if so, throws an exception. It also checks if the parameter is structured, and if so, throws an exception. It then creates a new SubParmName with the specified element index and calls the FromObject method of the parameter with the SubParmName and the object.

void ObjectToParm(ProgParm parameter, object value, int element)

Parameters

Type Parameter name Description
ProgParm parameter The parameter to convert the object to.
Object value The object to convert.
Int32 element The index of the element to convert, if the parameter is an array.

void ObjectToParm(ProgParm parameter, object value)

Converts the specified object to a parameter.

Remarks

This method converts the specified object to a parameter in the ASNA DataGate client. It checks if the provided parameter is null or has no metadata, and if so, throws an exception. It also checks if the parameter is structured, and if so, throws an exception. It then calls the ObjectToParm method with the parameter, object, and an element index of 0.

void ObjectToParm(ProgParm parameter, object value)

Parameters

Type Parameter name Description
ProgParm parameter The parameter to convert the object to.
Object value The object to convert.

void ObjectToParm(object value, string parameterName, Int32[] elementIndices)

Converts the specified object to a parameter of the specified name and element indices.

Remarks

This method converts the specified object to a parameter of the specified name and element indices in the ASNA DataGate client. It checks if the provided parameter name is null, and if so, throws an ArgumentNullException. It then creates a new SubParmName with the specified parameter name and element indices, and gets the parameter with the name from the SubParmName. If no such parameter exists, it throws an ArgumentException. It then calls the FromObject method of the parameter with the SubParmName and the object.

void ObjectToParm(object value, string parameterName, Int32[] elementIndices)

Parameters

Type Parameter name Description
Object value The object to convert.
String parameterName The name of the parameter to convert the object to.
Int32[] elementIndices The indices of the elements to convert, if the parameter is an array.

void ObjectToParm(object value, string parameterName)

Converts the specified object to a parameter of the specified name.

Remarks

This method converts the specified object to a parameter of the specified name in the ASNA DataGate client. It calls the ObjectToParm method with the object, parameter name, and an empty array of element indices.

void ObjectToParm(object value, string parameterName)

Parameters

Type Parameter name Description
Object value The object to convert.
String parameterName The name of the parameter to convert the object to.

See Also