Method StopAsync
StopAsync()
Asynchronously stops this local service instance, and returns a Task object.
Declaration
public Task StopAsync()
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous stop operation. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Service can only be stopped when in the started state. |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |