Пример #1
0
 public void ValidateFeature(IFeatureValidationContext context)
 {
     foreach (var projectItem in context.Feature.ProjectItems)
     {
         ValidateProjectItem(context, projectItem);
     }
 }
Пример #2
0
 public void ValidateProjectItem(
     IFeatureValidationContext context,
     ISharePointProjectItem projectItem)
 {
     if (projectItem.Name == "")
     {
         context.RuleViolations.Add(
             "CustomFeatureValidationRule001",
             ValidationRuleViolationSeverity.Warning,
             "SharePoint project items must have a name.");
     }
 }