fix Change Configuration.initialize to be async
This commit is contained in:
1 parent
faeb10cf9d
commit
f3b9cb2d62
1 file changed
+1
-8
@@ -15,7 +15,6 @@ namespace bts.api.core {
|
||||
readonly object lockObj = new();
|
||||
LazyOnce<ManagedQuickbusWrapper>? quickbusBacking;
|
||||
bool isDisposed;
|
||||
IntPtr _qbus => quickbusBacking?.Value?.Handle ?? throw new ObjectDisposedException(nameof(ServiceContext));
|
||||
|
||||
AuthToken? _token;
|
||||
|
||||
@@ -49,13 +48,7 @@ namespace bts.api.core {
|
||||
public UserTuple? user { get; private set; }
|
||||
public bool is_authenticated => _token is not null;
|
||||
|
||||
internal IntPtr native_context => _qbus;
|
||||
|
||||
public static ServiceContext create(string? config_server = null) {
|
||||
BTS.init(config_server);
|
||||
var qbus = ApiNativeMethods.api_create_quickbus(null, 0);
|
||||
return new ServiceContext(qbus);
|
||||
}
|
||||
internal IntPtr native_context => quickbusBacking?.Value?.Handle ?? throw new ObjectDisposedException(nameof(ServiceContext));
|
||||
|
||||
public T locate<T>(string qualifier = "") where T : class, IApiClient {
|
||||
var ctr = typeof(T).GetConstructors(BindingFlags.NonPublic | BindingFlags.Instance)
|
||||
|
||||
Reference in new issue
Block a user