PromoCodeUsageValidationException Constructor (String, String, PromoCodeUsageOption, Boolean, Exception)
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, _
inner As Exception _
)
'Usage
Dim message As String
Dim propertyName As String
Dim usageOption As PromoCodeUsageOption
Dim isPublicCodeSet As Boolean
Dim inner As Exception
Dim instance As New PromoCodeUsageValidationException(message, _
propertyName, usageOption, isPublicCodeSet, _
inner)
public PromoCodeUsageValidationException(
string message,
string propertyName,
PromoCodeUsageOption usageOption,
bool isPublicCodeSet,
Exception inner
)
public:
PromoCodeUsageValidationException(
String^ message,
String^ propertyName,
PromoCodeUsageOption usageOption,
bool isPublicCodeSet,
Exception^ inner
)
public function PromoCodeUsageValidationException(
message : String,
propertyName : String,
usageOption : PromoCodeUsageOption,
isPublicCodeSet : boolean,
inner : Exception
)
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.
- inner
Type: System..::.Exception
The exception that is the cause of the current exception, or a nullNothingnullptra null reference (Nothing in Visual Basic) reference (Nothing in Visual Basic) if no inner exception is specified.
Remarks
If the inner parameter is not a nullNothingnullptra null reference (Nothing in Visual Basic) reference, the current exception is raised in a catch block that handles the inner exception.
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