static DbFactory() { var appInfo = new AppInfo { Id = "safe.networkdrive", Name = "SAFE.NetworkDrive", Vendor = "oetyng" }; SAFEClient.SetFactory(async(sess, app, db) => (object)await StreamDbFactory.CreateForApp(sess, app, db)); _factory = new ClientFactory(appInfo, (session, appId) => new SAFEClient(session, appId)); }
public Task <Result <IStreamDb> > GetOrAddDbAsync(string dbId, MdHeadPermissionSettings permissionSettings = null) => _dbFactory.CreateForApp(_appId, dbId, permissionSettings);
internal async Task <IStreamDb> GetDatabase(string dbName, MdHeadPermissionSettings permissionSettings = null) { var res = await _dbFactory.CreateForApp(_appId, dbName, permissionSettings); return(res.Value); }