public override Task CascadeAsync(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled, CancellationToken cancellationToken) { if (cancellationToken.IsCancellationRequested) { return(Task.FromCanceled <object>(cancellationToken)); } try { if (log.IsDebugEnabled) { log.Debug("cascading to delete: " + entityName); } return(session.DeleteAsync(entityName, child, isCascadeDeleteEnabled, (ISet <object>)anything, cancellationToken)); } catch (Exception ex) { return(Task.FromException <object>(ex)); } }