Table of Contents

Class RegisterPromotionRuleAttribute<TPromotionRule>

Namespace
CMS.Commerce
Assembly
CMS.Commerce.dll

Registers a promotion rule.

[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class RegisterPromotionRuleAttribute<TPromotionRule> : Attribute, IPreInitAttribute where TPromotionRule : IPromotionRule

Type Parameters

TPromotionRule
Inheritance
object
Attribute
RegisterPromotionRuleAttribute<TPromotionRule>
Implements
Extension Methods

Constructors

RegisterPromotionRuleAttribute(string, PromotionType, string)

Initializes a new instance of RegisterPromotionRuleAttribute<TPromotionRule> class.

public RegisterPromotionRuleAttribute(string identifier, PromotionType promotionType, string name)

Parameters

identifier string

Unique identifier of the promotion.

promotionType PromotionType

Type of the promotion.

name string

Name of the registered promotion rule.

Properties

Identifier

Unique identifier of the promotion rule.

public string Identifier { get; }

Property Value

string

MarkedType

Promotion rule type.

public Type MarkedType { get; }

Property Value

Type

Name

Name of the registered promotion rule.

public string Name { get; }

Property Value

string

PromotionType

Promotion type.

public PromotionType PromotionType { get; }

Property Value

PromotionType

Methods

PreInit()

Registers the promotion definition during application pre-initialization.

public void PreInit()