Share via


OrderAddress Constructor (String, Profile)

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

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

Syntax

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

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

Parameters

Exceptions

Exception Condition
ArgumentNullException

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

ArgumentException

The length of addressName, or one of the strings in the profile, is greater than the maximum specified in the orders storage mapping file.

AddressMapMissingException

The orders configuration section of web.config does not have an address map.

CommerceProfileSystemException

You have mapped a profile property in the address map of the orders configuration section in Web.config to a property that doesn't exist in OrderAddress.

Remarks

If a user profile from the profile system has an address defined, the orders subsystem is able to copy it through a section in Web.config. The address map of the orders configuration section in Web.config specifies which profile property will be copied to which OrderAddress property.

Use this constructor if you want the OrderAddress properties to be populated from and existing Profile.

The addressName string value is trimmed of all whitespace characters prior to use.

The default maximum length for addressName is 64 characters, as defined in the corresponding table column constraint specified in the default orders storage mapping file, OrderObjectMappings.xml. Other size limits for OrderAddress properties are specified in the mapping file as well.

Permissions

See Also

Reference

OrderAddress Class

OrderAddress Members

OrderAddress Overload

Microsoft.CommerceServer.Runtime.Orders Namespace