示例#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);
         }
     }
 }
 public void OnPreRecreateCollection(PreCollectionRecreateEvent @event)
 {
     AddEvent(@event, this);
 }
示例#5
0
 public void OnPreRecreateCollection(PreCollectionRecreateEvent e)
 {
     OnCollection(e);
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="evt"></param>
 public void OnPreRecreateCollection(PreCollectionRecreateEvent evt)
 {
 }
示例#7
0
 public void OnPreRecreateCollection(PreCollectionRecreateEvent @event)
 {
     log.Debug("OnPreRecreateCollection :" + @event);
 }