public async void ServerDeleted(IDeletedEntry <Server> server) { using (var scope = _serviceProvider.CreateScope()) { var authService = scope.ServiceProvider.GetService <IAuthorizationService>(); var connections = (await _hubConnectionManager.GetConnectedUsers <ServersHub>() .FilterAsync(async c => (await authService.AuthorizeAsync(c.Value, server.Entity, "ServerPolicy")).Succeeded)) .Select(c => c.Key) .Distinct(); await NotifyServerDeleted(server.Entity, connections.ToArray()); } }
private void ResultProxy_Deleted(IDeletedEntry <ResultProxy, DbContext> obj) { Results_Changed(); }
private void SearchProxy_Deleted(IDeletedEntry <SearchProxy, DbContext> obj) { Searches_Changed(); }