Beispiel #1
0
        /// <summary>
        /// Determines if this SPI is included inside a feature that is packaged in any project in the solution.
        /// </summary>
        /// <param name="item">The ISharePointProjectItem being extended.</param>
        /// <param name="service">The sharepoint project service.</param>
        /// <returns>Returns true if this SPI is included inside a feature that is packaged in any project in the solution.</returns>
        public static bool IsPartOfAnyPackagedProjectFeature(this ISharePointProjectItem item, ISharePointProjectService service)
        {
            foreach (ISharePointProject project in service.Projects)
            {
                if (item.IsPartOfPackagedProjectFeature(project))
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #2
0
 /// <summary>
 /// Determines if this SPI is packaged in the given project whether by feature or direct (e.g. mapped folder).
 /// </summary>
 /// <param name="item">The ISharePointProjectItem being extended.</param>
 /// <param name="project">The current project.</param>
 /// <returns>Returns true if this SPI is packaged in the given project whether by feature or direct (e.g. mapped folder).</returns>
 public static bool IsPartOfProjectPackage(this ISharePointProjectItem item, ISharePointProject project)
 {
     return(item.IsDirectPartOfProjectPackage(project) || item.IsPartOfPackagedProjectFeature(project));
 }