Esempio n. 1
0
        /// <summary>
        /// Check all specified features & report info about them -- what scopes are represented
        /// </summary>
        /// <returns></returns>
        private static FeatureScopeInfoType GetFeatureScopeInfo()
        {
            FeatureScopeInfoType fsinfo = new FeatureScopeInfoType();

            if (InstallConfiguration.FeatureIdList != null)
            {
                foreach (Guid?guid in InstallConfiguration.FeatureIdList)
                {
                    if (guid == null)
                    {
                        continue;           // Perry, 2010-10-06: I don't know why we allow null GUIDs in this list anyway
                    }
                    SPFeatureDefinition fdef = SPFarm.Local.FeatureDefinitions[guid.Value];
                    if (fdef != null)
                    {
                        fsinfo.AddFeatureScope(fdef.Scope);
                    }
                }
            }
            return(fsinfo);
        }
 /// <summary>
 /// Check all specified features & report info about them -- what scopes are represented
 /// </summary>
 /// <returns></returns>
 private static FeatureScopeInfoType GetFeatureScopeInfo()
 {
     FeatureScopeInfoType fsinfo = new FeatureScopeInfoType();
     if (InstallConfiguration.FeatureIdList != null)
     {
     foreach (Guid? guid in InstallConfiguration.FeatureIdList)
     {
         if (guid == null) continue; // Perry, 2010-10-06: I don't know why we allow null GUIDs in this list anyway
         SPFeatureDefinition fdef = SPFarm.Local.FeatureDefinitions[guid.Value];
         if (fdef != null)
         {
             fsinfo.AddFeatureScope(fdef.Scope);
         }
     }
     }
     return fsinfo;
 }