mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-22 11:13:30 +00:00
no null check needed
This commit is contained in:
@@ -34,7 +34,14 @@ namespace Bit.Core.Services
|
||||
}
|
||||
|
||||
public ServiceController Controller { get; private set; }
|
||||
public ServiceControllerStatus Status => Controller.Status;
|
||||
public ServiceControllerStatus Status
|
||||
{
|
||||
get
|
||||
{
|
||||
Controller.Refresh();
|
||||
return Controller.Status;
|
||||
}
|
||||
}
|
||||
public string StatusString => Controller == null ? "Unavailable" : Status.ToString();
|
||||
public bool Running => Status == ServiceControllerStatus.Running;
|
||||
public bool Paused => Status == ServiceControllerStatus.Paused;
|
||||
|
||||
Reference in New Issue
Block a user