Item Property

Gets or sets a weakly-typed custom property name for an order instance.

Namespace:  Microsoft.CommerceServer.Runtime.Orders
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Property Item ( _
    keyName As String _
) As Object
'Usage
Dim instance As OrderGroup
Dim keyName As String
Dim value As Object

value = instance.Item(keyName)

instance.Item(keyName) = value
public Object Item[
    string keyName
] { get; set; }
public:
property Object^ Item[String^ keyName] {
    Object^ get (String^ keyName);
    void set (String^ keyName, Object^ value);
}
JScript does not support indexed properties.

Parameters

  • keyName
    Type: System..::.String
    The property name to get or set. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).

Property Value

Type: System..::.Object
An object describing the weakly-typed properties.

Exceptions

Exception Condition
InvalidOperationException

The order group has been disposed, either directly or by conversion from an OrderTemplate to a Basket or a Basket to a PurchaseOrder.

PropertyConflictException

keyName conflicts with a strongly-typed property name or the name of a dictionary key that is mapped to a strongly-typed property of the OrderForm class through the pipeline adapter mapping file (OrderPipelineMappings.xml in the default Commerce Server installation).

ArgumentNullException

keyName is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

Weakly-typed properties with the same name as strongly typed properties are not allowed.

To support legacy Commerce Server functionality, weakly-typed property names starting with an underscore (_) will not be written to storage. For example, OrderGroup[_test] describes a key 'test' which would not be written to storage. Names without underscore prefixes that are not serializable will also not be stored.

Item is trimmed of leading and trailing white space characters before performing a get or a set.

Permissions

See Also

Reference

OrderGroup Class

OrderGroup Members

Microsoft.CommerceServer.Runtime.Orders Namespace