ConnectionExtensionsItemByIdT Method (IConnection, String, String, FuncIReadOnlyItem, T) |
Retrieve an item based on its type and ID and map it to an object
Namespace: Innovator.ClientAssembly: Innovator.Client (in Innovator.Client.dll) Version: 2016.1.15.1759 (2016.01.15.1759)
Syntax public static T ItemById<T>(
this IConnection conn,
string itemTypeName,
string id,
Func<IReadOnlyItem, T> mapper
)
<ExtensionAttribute>
Public Shared Function ItemById(Of T) (
conn As IConnection,
itemTypeName As String,
id As String,
mapper As Func(Of IReadOnlyItem, T)
) As T
Parameters
- conn
- Type: Innovator.ClientIConnection
Connection to query the item on - itemTypeName
- Type: SystemString
Name of the item type - id
- Type: SystemString
ID of the item - mapper
- Type: SystemFuncIReadOnlyItem, T
Mapping function used to get an object from the item data
Type Parameters
- T
Return Value
Type:
TUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IConnection. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also