PosSharp v1.2.0 API Reference

--- #### [PosSharp\.Core](PosSharp.Core 'PosSharp\.Core') ### [PosSharp\.Core](PosSharp.Core 'PosSharp\.Core').[UposDeviceBase](PosSharp.Core.UposDeviceBase 'PosSharp\.Core\.UposDeviceBase') ## UposDeviceBase\.SetEnabledAsync\(bool, CancellationToken\) Method Enables or disables the device\. ```csharp public System.Threading.Tasks.Task SetEnabledAsync(bool enabled, System.Threading.CancellationToken ct=default(System.Threading.CancellationToken)); ``` #### Parameters `enabled` [System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean') [true](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/bool 'https://docs\.microsoft\.com/en\-us/dotnet/csharp/language\-reference/builtin\-types/bool') to enable; [false](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/bool 'https://docs\.microsoft\.com/en\-us/dotnet/csharp/language\-reference/builtin\-types/bool') to disable\. `ct` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') A token to cancel the operation\. Implements [SetEnabledAsync\(bool, CancellationToken\)](https://learn.microsoft.com/en-us/dotnet/api/possharp.abstractions.iuposdevice.setenabledasync#possharp-abstractions-iuposdevice-setenabledasync(system-boolean-system-threading-cancellationtoken) 'PosSharp\.Abstractions\.IUposDevice\.SetEnabledAsync\(System\.Boolean,System\.Threading\.CancellationToken\)') #### Returns [System\.Threading\.Tasks\.Task](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task 'System\.Threading\.Tasks\.Task') A task representing the asynchronous operation\.