Share via


CommerceEventAttribute Class

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

Attributes that identify a class as being a Commerce Server event. This class cannot be inherited.

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

Syntax

'Declaration
<ComVisibleAttribute(False)> _
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False, Inherited := True)> _
Public NotInheritable Class CommerceEventAttribute _
    Inherits Attribute
'Usage
Dim instance As CommerceEventAttribute
[ComVisibleAttribute(false)]
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class CommerceEventAttribute : Attribute
[ComVisibleAttribute(false)]
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = false, Inherited = true)]
public ref class CommerceEventAttribute sealed : public Attribute
public final class CommerceEventAttribute extends Attribute

Remarks

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 

Inheritance Hierarchy

System..::.Object
  System..::.Attribute
    Microsoft.CommerceServer.Runtime..::.CommerceEventAttribute

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

CommerceEventAttribute Members

Microsoft.CommerceServer.Runtime Namespace