Class TwinPrimitiveExtensions
Provides series of extension method for accessing primitive items.
Inherited Members
Namespace: AXSharp.Connector
Assembly: AXSharp.Connector.dll
Syntax
public static class TwinPrimitiveExtensions
Methods
| Edit this page View SourceGetAttribute<T>(ITwinElement)
Get attribute of a particular type defined in the declaration of a twin element.
Declaration
public static T GetAttribute<T>(this ITwinElement twinElement) where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
ITwinElement | twinElement | Element for which the information is to be retrieved. |
Returns
Type | Description |
---|---|
T | Attribute |
Type Parameters
Name | Description |
---|---|
T | Attribute type |
GetCyclicValue<T>(OnlinerBase)
Get the cyclic value of a primitive item.
Declaration
public static T GetCyclicValue<T>(this OnlinerBase primitive)
Parameters
Type | Name | Description |
---|---|---|
OnlinerBase | primitive | Primitive item of which the value will be retrieved. |
Returns
Type | Description |
---|---|
T | Value of given primitive item. |
Type Parameters
Name | Description |
---|---|
T | Type of value to return. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
GetLastValue<T>(OnlinerBase)
Gets the last value retrieved by the twin.
Declaration
public static T GetLastValue<T>(this OnlinerBase primitive)
Parameters
Type | Name | Description |
---|---|---|
OnlinerBase | primitive | Primitive item of which the value will be retrieved. |
Returns
Type | Description |
---|---|
T | Last value of primitive item. |
Type Parameters
Name | Description |
---|---|
T | Type of value to return. |
GetPropertyInfoViaSymbol(ITwinElement)
Gets property information using symbol information to access the property information from particular instance.
Declaration
public static PropertyInfo GetPropertyInfoViaSymbol(this ITwinElement twinElement)
Parameters
Type | Name | Description |
---|---|---|
ITwinElement | twinElement | Twin element about which the property information is to be retrieved. |
Returns
Type | Description |
---|---|
PropertyInfo | Property information declared on a particular instance of a twin element. |
GetShadowValue<T>(OnlinerBase)
Get current shadow value of the primitive item.
Declaration
public static T GetShadowValue<T>(this OnlinerBase primitive)
Parameters
Type | Name | Description |
---|---|---|
OnlinerBase | primitive | Primitive item of which the value will be retrieved. |
Returns
Type | Description |
---|---|
T | Shadow value of the primitive item. |
Type Parameters
Name | Description |
---|---|
T | Type of value to return. |
SetCyclicValue<T>(OnlinerBase, T)
Sets the cyclic value of an onliner.
Declaration
public static void SetCyclicValue<T>(this OnlinerBase primitive, T value)
Parameters
Type | Name | Description |
---|---|---|
OnlinerBase | primitive | Primitive item. |
T | value | Value to be written to the cyclic variable. |
Type Parameters
Name | Description |
---|---|
T | Type of value to be written. |
SetShadowValue<T>(OnlinerBase, T)
Sets the shadow value of an onliner.
Declaration
public static void SetShadowValue<T>(this OnlinerBase primitive, T value)
Parameters
Type | Name | Description |
---|---|---|
OnlinerBase | primitive | Primitive item to which the shadow value will be written. |
T | value | Value to be written. |
Type Parameters
Name | Description |
---|---|
T | Type of value to be written. |