コード例 #1
0
ファイル: CascadingAction.cs プロジェクト: jrauber/GH1429
 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));
     }
 }