Freigeben über


CommerceEventMemberAttribute Constructor

Initializes a new instance of the CommerceEventMemberAttribute class.

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

Syntax

'Declaration
Public Sub New ( _
    memberName As String _
)
'Usage
Dim memberName As String

Dim instance As New CommerceEventMemberAttribute(memberName)
public CommerceEventMemberAttribute(
    string memberName
)
public:
CommerceEventMemberAttribute(
    String^ memberName
)
public function CommerceEventMemberAttribute(
    memberName : String
)

Parameters

  • memberName
    Type: System..::.String
    The name of the property with which the attribute is associated.

Remarks

The CommerceEventMemberAttribute class marks Commerce Server event class properties as Commerce Server properties and also associates a Commerce Server-specific short name with the particular event class.

In the example, the attribute is used to mark the ProductID property of the AddToBasketEvent class as a Commerce Server event property and to associate the Commerce Server-specific short name PRID with the property.

Examples

[CommerceEvent("BSK")]
public class AddToBasketEvent : BaseCommerceEvent
{
  [CommerceEventMember("PRID")]
  public string ProductID
  {
    get
    {
      ...
    }
    set
    {
      ...
    }
  }
}

Permissions

See Also

Reference

CommerceEventMemberAttribute Class

CommerceEventMemberAttribute Members

Microsoft.CommerceServer.Runtime Namespace