コード例 #1
0
 public Task OnPreRecreateCollectionAsync(PreCollectionRecreateEvent @event, CancellationToken cancellationToken)
 {
     try
     {
         AddEvent(@event, this);
         return(Task.CompletedTask);
     }
     catch (System.Exception ex)
     {
         return(Task.FromException <object>(ex));
     }
 }
コード例 #2
0
 private void PreRecreate()
 {
     IPreCollectionRecreateEventListener[] preListeners = Session.Listeners.PreCollectionRecreateEventListeners;
     if (preListeners.Length > 0)
     {
         PreCollectionRecreateEvent preEvent = new PreCollectionRecreateEvent(Persister, Collection, (IEventSource)Session);
         for (int i = 0; i < preListeners.Length; i++)
         {
             preListeners[i].OnPreRecreateCollection(preEvent);
         }
     }
 }
コード例 #3
0
 private async Task PreRecreateAsync(CancellationToken cancellationToken)
 {
     cancellationToken.ThrowIfCancellationRequested();
     IPreCollectionRecreateEventListener[] preListeners = Session.Listeners.PreCollectionRecreateEventListeners;
     if (preListeners.Length > 0)
     {
         PreCollectionRecreateEvent preEvent = new PreCollectionRecreateEvent(Persister, Collection, (IEventSource)Session);
         for (int i = 0; i < preListeners.Length; i++)
         {
             await(preListeners[i].OnPreRecreateCollectionAsync(preEvent, cancellationToken)).ConfigureAwait(false);
         }
     }
 }
コード例 #4
0
 public void OnPreRecreateCollection(PreCollectionRecreateEvent @event)
 {
     AddEvent(@event, this);
 }
コード例 #5
0
 public void OnPreRecreateCollection(PreCollectionRecreateEvent e)
 {
     OnCollection(e);
 }
コード例 #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="evt"></param>
 public void OnPreRecreateCollection(PreCollectionRecreateEvent evt)
 {
 }
コード例 #7
0
 public void OnPreRecreateCollection(PreCollectionRecreateEvent @event)
 {
     log.Debug("OnPreRecreateCollection :" + @event);
 }