Class IVortexObjectExtensions
Provides extension methods for Vortex.Connector.IVortexObject.
Inheritance
Inherited Members
Namespace: TcoCore
Assembly: TcOpen.Inxton.Abstractions.dll
Syntax
public static class IVortexObjectExtensions
Methods
| Improve this Doc View SourceGetChildren<T>(IVortexObject)
Get the children of given type of this Vortex.Connector.IVortexObject
Declaration
public static IEnumerable<T> GetChildren<T>(this IVortexObject obj)
Parameters
Type | Name | Description |
---|---|---|
Vortex.Connector.IVortexObject | obj | Searched object |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | Children of this object. |
Type Parameters
Name | Description |
---|---|
T |
Remarks
Take into consideration possible performance degradation due to use of reflections in this method.
GetChildren<T>(IVortexObject, IEnumerable<Object>)
Declaration
public static IEnumerable<T> GetChildren<T>(this IVortexObject obj, IEnumerable<object> excluding)
where T : IVortexObject
Parameters
Type | Name | Description |
---|---|---|
Vortex.Connector.IVortexObject | obj | |
System.Collections.Generic.IEnumerable<System.Object> | excluding |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> |
Type Parameters
Name | Description |
---|---|
T |
GetDescendants<T>(IVortexObject, IList<T>)
Searches recursively the children of this Vortex.Connector.IVortexObject
Declaration
public static IEnumerable<T> GetDescendants<T>(this IVortexObject obj, IList<T> children = null)
where T : class
Parameters
Type | Name | Description |
---|---|---|
Vortex.Connector.IVortexObject | obj | Searched object |
System.Collections.Generic.IList<T> | children | [optional] Pre-existing children. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | Children of this object. |
Type Parameters
Name | Description |
---|---|
T |
Remarks
Take into consideration possible performance degradation due to use of reflections in this method.
GetDescendants<T>(IVortexObject, Int32, IList<T>, Int32)
Gets descendant objects of given type up to given tree depth.
Declaration
public static IEnumerable<T> GetDescendants<T>(this IVortexObject obj, int depth, IList<T> children = null, int currentDepth = 0)
where T : class
Parameters
Type | Name | Description |
---|---|---|
Vortex.Connector.IVortexObject | obj | Root object |
System.Int32 | depth | Depth to search for descendant objects |
System.Collections.Generic.IList<T> | children | [optional] Pre-existing descendants. |
System.Int32 | currentDepth | [optional] Current depth |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | Descendant of given type up to given depth. |
Type Parameters
Name | Description |
---|---|
T | Descendant type |
Remarks
Take into consideration possible performance degradation due to use of reflections in this method.
GetParent<T>(IVortexObject, T)
Searches recursively the parents of this Vortex.Connector.IVortexObject until encounters object of given type. When the root object Vortex.Connector.IConnector is hit climbing up the hierarchy the method returns pre-existing parent.
Declaration
public static T GetParent<T>(this IVortexObject obj, T parent = null)
where T : class
Parameters
Type | Name | Description |
---|---|---|
Vortex.Connector.IVortexObject | obj | Searched object |
T | parent | [optional] Pre-existing parent. |
Returns
Type | Description |
---|---|
T | Parent object of given type. |
Type Parameters
Name | Description |
---|---|
T |
Remarks
Take into consideration possible performance degradation due to use of reflections in this method.
GetPlainFromOnline(IVortexObject)
Get the Plain (POCO) object populated with current online data.
Declaration
public static object GetPlainFromOnline(this IVortexObject obj)
Parameters
Type | Name | Description |
---|---|---|
Vortex.Connector.IVortexObject | obj | Onliner from which the plain is created. |
Returns
Type | Description |
---|---|
System.Object | Plain (POCO) object populated with current online data. |
Remarks
This method uses dynamic casting, which may impact the performance of the data exchange.
GetPlainFromOnline<T>(IVortexObject)
Get the Plain (POCO) object populated with current online data.
Declaration
public static T GetPlainFromOnline<T>(this IVortexObject obj)
Parameters
Type | Name | Description |
---|---|---|
Vortex.Connector.IVortexObject | obj | Onliner from which the plain is created. |
Returns
Type | Description |
---|---|
T | Plain (POCO) object populated with current online data. |
Type Parameters
Name | Description |
---|---|
T |
Remarks
This method uses dynamic casting, which may impact the performance of the data exchange.