-
Notifications
You must be signed in to change notification settings - Fork 358
/
Copy pathIExtensionService.cs
38 lines (26 loc) · 1.51 KB
/
IExtensionService.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Windows.Foundation;
namespace DevHome.Common.Services;
public interface IExtensionService
{
Task<IEnumerable<IExtensionWrapper>> GetInstalledExtensionsAsync(bool includeDisabledExtensions = false);
Task<IEnumerable<string>> GetInstalledDevHomeWidgetPackageFamilyNamesAsync(bool includeDisabledExtensions = false);
Task<IEnumerable<IExtensionWrapper>> GetInstalledExtensionsAsync(Microsoft.Windows.DevHome.SDK.ProviderType providerType, bool includeDisabledExtensions = false);
IExtensionWrapper? GetInstalledExtension(string extensionUniqueId);
Task SignalStopExtensionsAsync();
public event EventHandler OnExtensionsChanged;
public event TypedEventHandler<IExtensionService, IExtensionWrapper> ExtensionToggled;
public void EnableExtension(string extensionUniqueId);
public void DisableExtension(string extensionUniqueId);
/// <summary>
/// Gets a boolean indicating whether the extension was disabled due to the corresponding Windows optional feature
/// being absent from the machine or in an unknown state.
/// </summary>
/// <param name="extension">The out of proc extension object</param>
/// <returns>True only if the extension was disabled. False otherwise.</returns>
public Task<bool> DisableExtensionIfWindowsFeatureNotAvailable(IExtensionWrapper extension);
}