Sets a property to an item reference.

Namespace:  Aras.IOM
Assembly:  IOM (in IOM.dll) Version: 11.0.0.6296

Syntax

C#
public Item setPropertyItem(
	string propertyName,
	Item item
)
Visual Basic (Declaration)
Public Function setPropertyItem ( _
	propertyName As String, _
	item As Item _
) As Item
J#
public Item setPropertyItem(
	String propertyName,
	Item item
)
JScript
public function setPropertyItem(
	propertyName : String, 
	item : Item
) : Item

Parameters

propertyName
Type: System..::.String
Name of the property
item
Type: Aras.IOM..::.Item
Instance of Item whose 'node' appends or replaces child <Item> node under the specified property.

Return Value

Instance of the class that represent the item-property. Returned item shares its 'dom' with this (i.e. dom property of both instances points to the same instance of ArasXmlDocument).

Remarks

The method is trying to find the property with the specified name on the item. If not found, creates it. If the property's node contains child <Item> node, replace it with the passed item, else append passed item to the property's node. After the method was called, the passed item shares its 'dom' with this (i.e. 'dom' property of both instances points to the same instance of ArasXmlDocument).

Exceptions

ExceptionCondition
System..::.Exception
  • The instance doesn't represent a single item.
  • The instance has a wrong internal structure (e.g. item.node doesn't belong to item.dom; etc.).
System..::.ArgumentException
  • The item passed to the method doesn't represent a single item.
  • this.node is read-only.

See Also