/// <summary> /// Execute example. /// </summary> public void Run() { DismApi.Initialize(DismLogLevel.LogErrors); using (var session = DismApi.OpenOnlineSession()) { foreach (DismFeature feature in DismApi.GetFeatures(session)) { Console.WriteLine($"[Feature Name] {feature.FeatureName}"); Console.WriteLine($"[State] {feature.State}"); Console.WriteLine(); } } DismApi.Shutdown(); }
private Dictionary <string, DismPackageFeatureState> GetCurrentFeatures() => DismApi.GetFeatures(GetDismSession()).ToDictionary(x => x.FeatureName, x => x.State);