Share via


OrderAddress Constructor (String, String)

Initializes a new instance of the OrderAddress class using the specified address name and address ID.

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

Syntax

'Declaration
Public Sub New ( _
    addressName As String, _
    addressId As String _
)
'Usage
Dim addressName As String
Dim addressId As String

Dim instance As New OrderAddress(addressName, _
    addressId)
public OrderAddress(
    string addressName,
    string addressId
)
public:
OrderAddress(
    String^ addressName, 
    String^ addressId
)
public function OrderAddress(
    addressName : String, 
    addressId : String
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

addressName or addressId is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentException

The length of the addressName or addressId string being set is greater than the maximum length specified in the orders storage mapping file.

Remarks

Use this constructor instead of OrderAddress if you want to populate the properties of a new OrderAddress from a profile.

The string value for addressId is trimmed prior to use.

The default maximum length for addressId is 50 characters, and the maximum length for addressName is 64 characters, as defined in the corresponding table column constraints specified in the default orders storage mapping file: OrderObjectMappings.xml.

The key used to populate the context hashtable for order system extensibility is a string of the form "OrderAddress_X_Y" where X is a string representation of the GUID OrderGroupId and Y is the string OrderAddressId. OrderAddressId is not unique by itself except in the context of a particular order group.

Permissions

See Also

Reference

OrderAddress Class

OrderAddress Members

OrderAddress Overload

Microsoft.CommerceServer.Runtime.Orders Namespace