feat(IAuthClient): IsConnected, ConnectionError und ConnectionError Eigenschaften hinzugefügt.
- Umwandlung der Eigenschaft IsConnectionFailed in eine Erweiterungsmethode.
This commit is contained in:
parent
31ccd93b0d
commit
cfe5df4b1d
6
DigitalData.Auth.Abstractions/ClientExtensions.cs
Normal file
6
DigitalData.Auth.Abstractions/ClientExtensions.cs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace DigitalData.Auth.Abstractions;
|
||||
|
||||
public static class ClientExtensions
|
||||
{
|
||||
public static bool IsConnectionFailed(this IAuthClient client) => client.ConnectionError is not null;
|
||||
}
|
||||
@ -2,6 +2,12 @@
|
||||
|
||||
public interface IAuthClient : IAuthClientHandler
|
||||
{
|
||||
bool IsConnected { get; }
|
||||
|
||||
Exception? ConnectionError { get; }
|
||||
|
||||
bool IsConnectionFailed => ConnectionError is not null;
|
||||
|
||||
Task StartAsync();
|
||||
|
||||
Task<bool> TryStartAsync();
|
||||
|
||||
@ -47,8 +47,6 @@ public class AuthClient : IAuthClient
|
||||
|
||||
public Exception? ConnectionError { get; private set; }
|
||||
|
||||
public bool IsConnectionFailed => ConnectionError is not null;
|
||||
|
||||
public async Task StartAsync() => await _lazyInitiator.Value;
|
||||
|
||||
public async Task<bool> TryStartAsync()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user