Exemple #1
0
 /// <summary>
 /// Quick copy this artefact in the context of the specific package, but wherever this artefact is contained in that package.
 /// </summary>
 /// <param name="packageProject"></param>
 /// <param name="requiresQuickPackage"></param>
 public override void QuickCopy(SharePointPackageArtefact packageProject, bool requiresQuickPackage)
 {
     // We are directly deploying just this SPI and have not been called by our parent.
     // An SPI may be included in multiple features, or be against the project directly.
     if (item.IsDirectPartOfProjectPackage(packageProject.Project))
     {
         // Pass in the package itself as the parent.
         this.QuickCopy(packageProject, packageProject, requiresQuickPackage);
     }
     else
     {
         // The SPI may be included in multiple features in the project in context.
         foreach (ISharePointProjectFeature feature in item.GetFeaturesWhereInPackage(packageProject.Project))
         {
             QuickCopyableSharePointArtefact parent = new SharePointProjectFeatureArtefact(feature);
             this.QuickCopy(packageProject, parent, requiresQuickPackage);
         }
     }
 }
Exemple #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));
 }