Class IPlainExtensions
Provides a series of extension methods to work with POCO objects.
Inherited Members
Namespace: AXSharp.Connector
Assembly: AXSharp.Connector.dll
Syntax
public static class IPlainExtensions
Methods
| Edit this page View SourceFromOnline<T>(T, ITwinObject)
Copies data from online of a twin object into a new instance of respective POCO object
Declaration
public static Task<T> FromOnline<T>(this T plain, ITwinObject twin) where T : IPlain
Parameters
Type | Name | Description |
---|---|---|
T | plain | Target POCO object |
ITwinObject | twin | Source online twin object. |
Returns
Type | Description |
---|---|
Task<T> | New instance of a POCO object populated by the online data. |
Type Parameters
Name | Description |
---|---|
T | POCO object type |
FromShadow<T>(T, ITwinObject)
Copies data from twin shadow object into a POCO object.
Declaration
public static Task<T> FromShadow<T>(this T plain, ITwinObject twin) where T : IPlain
Parameters
Type | Name | Description |
---|---|---|
T | plain | Target POCO object. |
ITwinObject | twin | Source twin object. |
Returns
Type | Description |
---|---|
Task<T> | New instance of POCO object populated with data from the shadows of the twin object. |
Type Parameters
Name | Description |
---|---|
T | POCO object type |
ToOnline<T>(T, ITwinObject)
Copies data from plain object to respective twin object online data.
Declaration
public static Task ToOnline<T>(this T plain, ITwinObject twin) where T : IPlain
Parameters
Type | Name | Description |
---|---|---|
T | plain | Source POCO object |
ITwinObject | twin | Target twin object. |
Returns
Type | Description |
---|---|
Task |
Type Parameters
Name | Description |
---|---|
T | POCO object type |
ToShadow<T>(T, ITwinObject)
Copies data from the POCO object into respective shadows of the twin object.
Declaration
public static void ToShadow<T>(this T plain, ITwinObject twin) where T : IPlain
Parameters
Type | Name | Description |
---|---|---|
T | plain | Source POCO instance |
ITwinObject | twin | Target twin instance. |
Type Parameters
Name | Description |
---|---|
T | Source POCO type |