コード例 #1
0
        /// <summary>
        /// Retrieves all projects in the solution where this SPI is packaged.
        /// </summary>
        /// <param name="item">The ISharePointProjectItem being extended.</param>
        /// <param name="service">The sharepoint project service.</param>
        /// <returns>Returns all projects in the solution where this SPI is packaged.</returns>
        public static IEnumerable <ISharePointProject> GetProjectsWhereInPackage(this ISharePointProjectItem item, ISharePointProjectService service)
        {
            List <ISharePointProject> pkgProjects = new List <ISharePointProject>();

            foreach (ISharePointProject project in service.Projects)
            {
                if (item.IsPartOfProjectPackage(project))
                {
                    pkgProjects.Add(project);
                }
            }

            return(pkgProjects);
        }
コード例 #2
0
 /// <summary>
 /// Determines if this artefact is packaged as part of a specific project.
 /// </summary>
 /// <param name="project">The SharePoint project.</param>
 /// <returns>True if the artefact is packaged.</returns>
 public override bool IsPackaged(ISharePointProject project)
 {
     return(item.IsPartOfProjectPackage(project));
 }