Esempio n. 1
0
 /// <summary>
 /// Determines if this SPI is included inside a feature that is itself packaged in the given project.
 /// </summary>
 /// <param name="item">The ISharePointProjectItem being extended.</param>
 /// <param name="project">The current project.</param>
 /// <returns>Returns true if this SPI is included inside a feature that is itself packaged in the given project.</returns>
 public static bool IsPartOfPackagedProjectFeature(this ISharePointProjectItem item, ISharePointProject project)
 {
     return(item.ParentFeaturesInProject(project).Any(feature => feature.IsPartOfProjectPackage(project)));
 }
Esempio n. 2
0
 /// <summary>
 /// Retrieves all packaged features this SPI is a part of within a specific project.
 /// </summary>
 /// <param name="item">The ISharePointProjectItem being extended.</param>
 /// <param name="project">The current project.</param>
 /// <returns>Returns all packaged features this SPI is a part of within a specific project.</returns>
 public static IEnumerable <ISharePointProjectFeature> GetFeaturesWhereInPackage(this ISharePointProjectItem item, ISharePointProject project)
 {
     return(item.ParentFeaturesInProject(project).Where(feature => feature.IsPartOfProjectPackage(project)));
 }