Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Adds a rule violation to the rule violations collection.
Namespace: Microsoft.VisualStudio.SharePoint.Validation
Assembly: Microsoft.VisualStudio.SharePoint (in Microsoft.VisualStudio.SharePoint.dll)
Syntax
'Declaration
Function Add ( _
code As String, _
severity As ValidationRuleViolationSeverity, _
message As String, _
document As String, _
project As ISharePointProject, _
helpKeyword As String _
) As IValidationRuleViolation
IValidationRuleViolation Add(
string code,
ValidationRuleViolationSeverity severity,
string message,
string document,
ISharePointProject project,
string helpKeyword
)
Parameters
code
Type: StringThe error code to associate with the rule violation.
severity
Type: Microsoft.VisualStudio.SharePoint.Validation.ValidationRuleViolationSeverityThe severity of the rule violation.
message
Type: StringThe message to associate with the rule violation.
document
Type: StringThe document to associate with the rule violation.
project
Type: Microsoft.VisualStudio.SharePoint.ISharePointProjectThe project to associate with the rule violation.
helpKeyword
Type: StringThe help keyword to associate with the rule violation.
Return Value
Type: Microsoft.VisualStudio.SharePoint.Validation.IValidationRuleViolation
An object representing the rule violation that was added to the collection.
Remarks
Use this method to add rule violations without having to implement IValidationRuleViolation.
.NET Framework Security
- 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.