Interface ISettingEnvironment
Represents the environment that a device can interact with settings.
Inherited Members
Namespace: Microsoft.XboxStudios.DeviceConsole.Environments.Settings
Assembly: DeviceConsole.Environments.dll
Syntax
public interface ISettingEnvironment : IDeviceEnvironment, IDeviceContainer, IHasConnectionStatus
Methods
View SourceGetSettingAsync(string, TimeSpan?)
Gets a setting from the device.
Declaration
Task<DeviceSetting> GetSettingAsync(string settingName, TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
string | settingName | The name of the setting. |
TimeSpan? | timeout | The timeout for the operation. |
Returns
Type | Description |
---|---|
Task<DeviceSetting> | The setting with the specified name. |
GetSettingAsync(string, CancellationToken)
Gets a setting from the device.
Declaration
Task<DeviceSetting> GetSettingAsync(string settingName, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | settingName | The name of the setting. |
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task<DeviceSetting> | The setting with the specified name. |
GetSettingsAsync(TimeSpan?)
Gets all settings.
Declaration
Task<IEnumerable<DeviceSetting>> GetSettingsAsync(TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan? | timeout | The timeout for the operation. |
Returns
Type | Description |
---|---|
Task<IEnumerable<DeviceSetting>> | An enumerable of settings. |
GetSettingsAsync(CancellationToken)
Gets all settings.
Declaration
Task<IEnumerable<DeviceSetting>> GetSettingsAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task<IEnumerable<DeviceSetting>> | An enumerable of settings. |
SetSettingAsync(string, object, TimeSpan?)
Sets a setting on the device.
Declaration
Task SetSettingAsync(string settingName, object newValue, TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
string | settingName | The name of the setting to set. |
object | newValue | The new value for the setting. |
TimeSpan? | timeout | The timeout for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
SetSettingAsync(string, object, CancellationToken)
Sets a setting on the device.
Declaration
Task SetSettingAsync(string settingName, object newValue, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | settingName | The name of the setting to set. |
object | newValue | The new value for the setting. |
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |