Class DesktopServiceProxy
Used to proxy non-Hyper-V operations to the Neon Desktop service or execute them directly when the current process is running with elevated privileges.
Namespace: Neon.Kube.Setup
Assembly: Neon.Kube.Setup.dll
Syntax
public sealed class DesktopServiceProxy
Constructors
DesktopServiceProxy(GrpcChannel)
Alternate constructor the associated an open gRPC channel with the instance.
Declaration
public DesktopServiceProxy(GrpcChannel channel)
Parameters
Type | Name | Description |
---|---|---|
GrpcChannel | channel | The open gRPC channel. |
DesktopServiceProxy(bool?, string)
Constructor.
Declaration
public DesktopServiceProxy(bool? isAdminOverride = null, string socketPath = null)
Parameters
Type | Name | Description |
---|---|---|
bool? | isAdminOverride | Optionally overrides detection of elevated permissions enabled for the current process. This is used for testing. |
string | socketPath | Optionally overrides the default desktop service unix socket path. This is used for testing purposes. This defaults to WinDesktopServiceSocketPath where neon-desktop and neon-cli expect it to be. |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
GetWindowsOptionalFeaturesAsync()
Returns the status of optional Windows features.
Declaration
public Task<Dictionary<string, WindowsFeatureStatus>> GetWindowsOptionalFeaturesAsync()
Returns
Type | Description |
---|---|
Task<Dictionary<string, WindowsFeatureStatus>> | A Dictionary<TKey, TValue> mapping feature names to WindowsFeatureStatus"/> instances. |
ListLocalHostsSections()
Lists the names of the local host sections.
Declaration
public IEnumerable<LocalHostSection> ListLocalHostsSections()
Returns
Type | Description |
---|---|
IEnumerable<LocalHostSection> | The section names converted to uppercase. |