PromoCodeUsageValidationException Constructor (String, String, PromoCodeUsageOption, Boolean)
Initializes a new instance of the PromoCodeUsageValidationException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Namespace: Microsoft.CommerceServer.Marketing
Assembly: Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)
Syntax
'Declaration
Public Sub New ( _
message As String, _
propertyName As String, _
usageOption As PromoCodeUsageOption, _
isPublicCodeSet As Boolean _
)
'Usage
Dim message As String
Dim propertyName As String
Dim usageOption As PromoCodeUsageOption
Dim isPublicCodeSet As Boolean
Dim instance As New PromoCodeUsageValidationException(message, _
propertyName, usageOption, isPublicCodeSet)
public PromoCodeUsageValidationException(
string message,
string propertyName,
PromoCodeUsageOption usageOption,
bool isPublicCodeSet
)
public:
PromoCodeUsageValidationException(
String^ message,
String^ propertyName,
PromoCodeUsageOption usageOption,
bool isPublicCodeSet
)
public function PromoCodeUsageValidationException(
message : String,
propertyName : String,
usageOption : PromoCodeUsageOption,
isPublicCodeSet : boolean
)
Parameters
- message
Type: System..::.String
The error message that explains the reason for the exception.
- propertyName
Type: System..::.String
Name of the property that violated the range constraint.
- usageOption
Type: Microsoft.CommerceServer.Marketing..::.PromoCodeUsageOption
Current usage option of the PromoCodeDefinition.
- isPublicCodeSet
Type: System..::.Boolean
A value which indicates whether the public code is set for this PromoCodeDefinition.
Remarks
The exception is thrown when PromoCodeUsageOption is Public and no public code is set, or if PromoCodeUsageOption is not Public and a public code is set.
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.
See Also
Reference
PromoCodeUsageValidationException Class
PromoCodeUsageValidationException Members