Share via


CommerceEventAttribute Constructor

Initializes a new instance of the CommerceEventAttribute class with the specified short name.

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

Syntax

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

Dim instance As New CommerceEventAttribute(className)
public CommerceEventAttribute(
    string className
)
public:
CommerceEventAttribute(
    String^ className
)
public function CommerceEventAttribute(
    className : String
)

Parameters

  • className
    Type: System..::.String
    The name of the class to which this attribute is associated.

Remarks

Use this method to create a new instance of the CommerceEventAttribute class.

The CommerceEventAttribute class marks Commerce Server event classes and associates a Commerce Server-specific short name with the particular event class.

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

Examples

[CommerceEvent("BSK")]
public class AddToBasketEvent : BaseCommerceEvent 

Permissions

See Also

Reference

CommerceEventAttribute Class

CommerceEventAttribute Members

Microsoft.CommerceServer.Runtime Namespace