OrderAddress Constructor (SerializationInfo, StreamingContext)
Initializes a new instance of OrderAddress using the specified serialization information and streaming context.
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 OrderAddress(info, context)
protected OrderAddress(
SerializationInfo info,
StreamingContext context
)
protected:
OrderAddress(
SerializationInfo^ info,
StreamingContext context
)
protected function OrderAddress(
info : SerializationInfo,
context : StreamingContext
)
Parameters
- info
Type: System.Runtime.Serialization..::.SerializationInfo
The SerializationInfo used to retrieve data.
- context
Type: System.Runtime.Serialization..::.StreamingContext
The StreamingContext used for this serialization.
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 marked protected so it can be called from derived classes' deserialization constructors. This constructor must be called from a derived class's deserialization constructor to ensure that deserialization succeeds.
OrderAddress represents an address associated with the OrderGroup. Order addresses are uniquely identified by the address ID but they can also be tagged with a user friendly name. Order addresses are created as stand alone entities, then are added to an OrderAddressCollection.
All properties and methods of the OrderAddress, unless noted in the documentation, will behave the same whether or not the order address has been added to the order address collection.
OrderAddress implements IEnumerable to allow for enumeration over all weakly-typed properties in the order address.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.