Interface IProperty_Item<T>
Property of type item
Inherited Members
Namespace: Innovator.Client
Assembly: Innovator.Client.dll
Syntax
public interface IProperty_Item<in T> : IReadOnlyProperty_Item<T>, IProperty_Base, IElement, IReadOnlyProperty_Base, IReadOnlyElement, IAmlNode
Type Parameters
Name | Description |
---|---|
T |
Methods
| Improve this Doc View SourceAsItem()
Value converted to a IItem.
If the value cannot be converted, a 'null' item (where the
Exists property returns false
) is returned
Declaration
IItem AsItem()
Returns
Type | Description |
---|---|
IItem |
Examples
After executing the code
var item = aml.FromXml(@"<Item type='File'>
<created_by_id keyed_name="John Smith" type="User">A5CE5E3B4E3846D8A15C1C9300EAF7B4</created_by_id>
</Item>").AssertItem();
var creator = item.CreatedById().AsItem();
the structure of creator
will be
<Item type='User' id='A5CE5E3B4E3846D8A15C1C9300EAF7B4'gt;
<id keyed_name="John Smith" type="User">A5CE5E3B4E3846D8A15C1C9300EAF7B4</id>
<keyed_name>John Smith</keyed_name>
</Item>