Share via


OrderGroup Constructor (SerializationInfo, StreamingContext)

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Creates a new instance of the OrderGroup class using the specified serialization and streaming context information.

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

Syntax

'Declaration
Protected Sub New ( _
    info As SerializationInfo, _
    context As StreamingContext _
)
'Usage
Dim info As SerializationInfo
Dim context As StreamingContext

Dim instance As New OrderGroup(info, context)
protected OrderGroup(
    SerializationInfo info,
    StreamingContext context
)
protected:
OrderGroup(
    SerializationInfo^ info, 
    StreamingContext context
)
protected function OrderGroup(
    info : SerializationInfo, 
    context : StreamingContext
)

Parameters

Exceptions

Exception Condition
InvalidCastException

The data you are using to deserialize from potentially does not have the same fields or field types as the existing runtime object. This could indicate a version mismatch between the runtime objects and the stored data.

SerializationException

There was a version mismatch between the data being deserialized and the current runtime object.

Remarks

This constructor is protected and must be called from a derived class's deserialization constructor to ensure that deserialization succeeds.

OrderGroup is the base class for the Basket, PurchaseOrder, and OrderTemplate order group types in the order capture system. An order can go through several stages -- from a wish list, to a basket, to a completed order. In all incarnations of an order, the OrderGroup is the base class that backs all of these objects. OrderGroup contains all that is common across these different stages of an order. Derived classes can add methods and properties that are specific to that stage. For example, a derived Basket class might add methods for checking inventory. A derived PurchaseOrder class might contain methods to return shipping status.

OrderGroup supports the IEnumerable interface to allow for easy enumeration of all the strongly typed and non-strongly typed properties exposed by the order group instance. You may further sub-type these classes to create custom order group sub-types. However, the OrderGroup class itself is non-extensible. OrderGroup exposes a base set of properties and methods common to all OrderGroup sub-types. An order group instance is uniquely identifiable by the OrderGroupId.

Permissions

See Also

Reference

OrderGroup Class

OrderGroup Members

OrderGroup Overload

Microsoft.CommerceServer.Runtime.Orders Namespace