public override void LoadNodes() { base.LoadNodes(); CultureInfo cultureInfo = new CultureInfo(1033); foreach (SPFeatureDefinition definition in FeatureDefinitions) { try { this.Nodes.Add(new FeatureDefinitionNode(this.Tag, definition, InstalledIndex, UnInstalledIndex)); } catch { this.Nodes.Add(definition.Id.ToString() + " (Error)"); } } string programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); string path = programFiles + @"\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\FEATURES\"; foreach (string name in FeatureDefinitions.ScanForFeatures(Guid.Empty, true, false)) { this.Nodes.Add(new FeatureDefinitionNode(this.Tag, path, name, InstalledIndex, UnInstalledIndex)); } }
public ArrayInstance ScanForFeatures(object solutionId, bool scanOnly, bool force) { var guidSolutionId = GuidInstance.ConvertFromJsObjectToGuid(solutionId); var result = m_featureDefinitionCollection.ScanForFeatures(guidSolutionId, scanOnly, force); var arrResult = this.Engine.Array.Construct(); foreach (var item in result.OfType <SPFeatureDefinition>()) { ArrayInstance.Push(arrResult, new SPFeatureDefinitionInstance(this.Engine.Object.InstancePrototype, item)); } return(arrResult); }