IPackageValidationRule Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a rule to applied when validating a package in a SharePoint project.
public interface class IPackageValidationRule
public interface IPackageValidationRule
type IPackageValidationRule = interface
Public Interface IPackageValidationRule
Examples
Date | History | Reason |
---|---|---|
May 2010 | Added new remarks with links to topics that show how to implement this interface | Information enhancement. |
Remarks
Implement the IPackageValidationRule interface to define a custom validation rule to help verify that the package in a SharePoint project is valid. For more information, see How to: Create Custom Feature and Package Validation Rules for SharePoint Solutions.
Classes that implement this interface must include the System.ComponentModel.Composition.ExportAttribute to be discovered by the project system.
Methods
ValidateFeature(IPackageValidationContext, ISharePointProjectFeature) |
Determines whether a package would violate this rule if the specified feature were added. |
ValidatePackage(IPackageValidationContext) |
Determines whether a package currently violates this rule. |
ValidateProjectItem(IPackageValidationContext, ISharePointProjectItem) |
Determines whether a package would violate this rule if the specified project item is added. |