Share via


IValidationRuleViolationCollection.Add Method

Definition

Overloads

Add(IValidationRuleViolation)

Adds a rule violation to the rule violations collection.

Add(String, ValidationRuleViolationSeverity, String)

Adds a rule violation to the rule violations collection.

Add(String, ValidationRuleViolationSeverity, String, String, ISharePointProject, String)

Adds a rule violation to the rule violations collection.

Add(IValidationRuleViolation)

Adds a rule violation to the rule violations collection.

public:
 void Add(Microsoft::VisualStudio::SharePoint::Validation::IValidationRuleViolation ^ ruleViolation);
public void Add (Microsoft.VisualStudio.SharePoint.Validation.IValidationRuleViolation ruleViolation);
abstract member Add : Microsoft.VisualStudio.SharePoint.Validation.IValidationRuleViolation -> unit
Public Sub Add (ruleViolation As IValidationRuleViolation)

Parameters

ruleViolation
IValidationRuleViolation

The rule violation to add to the collection.

Applies to

Add(String, ValidationRuleViolationSeverity, String)

Adds a rule violation to the rule violations collection.

public:
 Microsoft::VisualStudio::SharePoint::Validation::IValidationRuleViolation ^ Add(System::String ^ code, Microsoft::VisualStudio::SharePoint::Validation::ValidationRuleViolationSeverity severity, System::String ^ message);
public Microsoft.VisualStudio.SharePoint.Validation.IValidationRuleViolation Add (string code, Microsoft.VisualStudio.SharePoint.Validation.ValidationRuleViolationSeverity severity, string message);
abstract member Add : string * Microsoft.VisualStudio.SharePoint.Validation.ValidationRuleViolationSeverity * string -> Microsoft.VisualStudio.SharePoint.Validation.IValidationRuleViolation
Public Function Add (code As String, severity As ValidationRuleViolationSeverity, message As String) As IValidationRuleViolation

Parameters

code
String

The error code to associate with the rule violation.

severity
ValidationRuleViolationSeverity

The severity of the rule violation.

message
String

The message to associate with the rule violation.

Returns

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.

Applies to

Add(String, ValidationRuleViolationSeverity, String, String, ISharePointProject, String)

Adds a rule violation to the rule violations collection.

public:
 Microsoft::VisualStudio::SharePoint::Validation::IValidationRuleViolation ^ Add(System::String ^ code, Microsoft::VisualStudio::SharePoint::Validation::ValidationRuleViolationSeverity severity, System::String ^ message, System::String ^ document, Microsoft::VisualStudio::SharePoint::ISharePointProject ^ project, System::String ^ helpKeyword);
public Microsoft.VisualStudio.SharePoint.Validation.IValidationRuleViolation Add (string code, Microsoft.VisualStudio.SharePoint.Validation.ValidationRuleViolationSeverity severity, string message, string document, Microsoft.VisualStudio.SharePoint.ISharePointProject project, string helpKeyword);
abstract member Add : string * Microsoft.VisualStudio.SharePoint.Validation.ValidationRuleViolationSeverity * string * string * Microsoft.VisualStudio.SharePoint.ISharePointProject * string -> Microsoft.VisualStudio.SharePoint.Validation.IValidationRuleViolation
Public Function Add (code As String, severity As ValidationRuleViolationSeverity, message As String, document As String, project As ISharePointProject, helpKeyword As String) As IValidationRuleViolation

Parameters

code
String

The error code to associate with the rule violation.

severity
ValidationRuleViolationSeverity

The severity of the rule violation.

message
String

The message to associate with the rule violation.

document
String

The document to associate with the rule violation.

project
ISharePointProject

The project to associate with the rule violation.

helpKeyword
String

The help keyword to associate with the rule violation.

Returns

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.

Applies to