Class ItemWrapper
Wraps an Aras item so that additional functionality can be easily provided
Inheritance
Inherited Members
Namespace: Innovator.Client
Assembly: Innovator.Client.dll
Syntax
public abstract class ItemWrapper : IReadOnlyItem, IReadOnlyElement, IAmlNode, IItemRef
Constructors
| Improve this Doc View SourceItemWrapper(IReadOnlyItem)
Initializes a new instance of the ItemWrapper class.
Declaration
public ItemWrapper(IReadOnlyItem item)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyItem | item | The item to wrap. |
Properties
| Improve this Doc View SourceAmlContext
Retrieve the context used for rendering primitive values
Declaration
public ElementFactory AmlContext { get; }
Property Value
Type | Description |
---|---|
ElementFactory |
Implements
| Improve this Doc View SourceExists
Returns true
if this element actually exists in the underlying AML,
otherwise, returns false
to indicate that the element is just a null placeholder
put in place to reduce unnecessary null reference checks
Declaration
public bool Exists { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Implements
| Improve this Doc View SourceName
Local XML name of the element (e.g. Item
, Relationships
,
config_id
, etc.). To access the property <name>
, there will be a
method such as NameProp()
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String | The XML name of the element |
Implements
| Improve this Doc View SourceParent
Retrieve the parent element
Declaration
public IReadOnlyElement Parent { get; }
Property Value
Type | Description |
---|---|
IReadOnlyElement |
Implements
| Improve this Doc View SourceValue
String value of the element
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
Methods
| Improve this Doc View SourceAttribute(String)
Retrieve the attribute with the specified name
Declaration
public IReadOnlyAttribute Attribute(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the XML attribute |
Returns
Type | Description |
---|---|
IReadOnlyAttribute |
|
Implements
| Improve this Doc View SourceAttributes()
Retrieve all attributes specified for the element
Declaration
public IEnumerable<IReadOnlyAttribute> Attributes()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IReadOnlyAttribute> | An System.Collections.Generic.IEnumerable<T> containing all of the defined attributes |
Implements
| Improve this Doc View SourceClone()
Creates a duplicate of the item object. All properties (including the ID) are preserved
Declaration
public IItem Clone()
Returns
Type | Description |
---|---|
IItem | A mutable copy of the current item |
Implements
| Improve this Doc View SourceElements()
Retrieve all child elements
Declaration
public IEnumerable<IReadOnlyElement> Elements()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IReadOnlyElement> |
Implements
| Improve this Doc View SourceId()
The ID of the item as retrieved from either the attribute or the property
Declaration
public string Id()
Returns
Type | Description |
---|---|
System.String |
Implements
| Improve this Doc View SourceProperty(String)
Returns a reference to the property with the specified name
Declaration
public virtual IReadOnlyProperty Property(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the property |
Returns
Type | Description |
---|---|
IReadOnlyProperty |
|
Implements
| Improve this Doc View SourceProperty(String, String)
Returns a reference to the property with the specified name and language
Declaration
public virtual IReadOnlyProperty Property(string name, string lang)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the property |
System.String | lang | Language of the (multilingual) property |
Returns
Type | Description |
---|---|
IReadOnlyProperty |
|
Implements
| Improve this Doc View SourceRelationships()
Returns the set of relationships associated with this item
Declaration
public IEnumerable<IReadOnlyItem> Relationships()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IReadOnlyItem> | An System.Collections.Generic.IEnumerable<T> containing all relationship items |
Implements
| Improve this Doc View SourceRelationships(String)
Returns the set of relationships associated with this item of the specified type
Declaration
public IEnumerable<IReadOnlyItem> Relationships(string type)
Parameters
Type | Name | Description |
---|---|---|
System.String | type | Name of the ItemType for the relationships you wish to retrieve |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IReadOnlyItem> | An System.Collections.Generic.IEnumerable<T> containing relationship items whose type name is equal to |
Implements
| Improve this Doc View SourceToAml()
Declaration
public string ToAml()
Returns
Type | Description |
---|---|
System.String |
ToAml(XmlWriter, AmlWriterSettings)
Write the node to the specified System.Xml.XmlWriter as AML
Declaration
public void ToAml(XmlWriter writer, AmlWriterSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | System.Xml.XmlWriter to write the node to |
AmlWriterSettings | settings | Settings controlling how the node is written |
Implements
| Improve this Doc View SourceTypeName()
The type of the item as retrieved from either the attribute or the property
Declaration
public string TypeName()
Returns
Type | Description |
---|---|
System.String |