public void OnPreRemoveCollection(PreCollectionRemoveEvent evt) { CollectionEntry collectionEntry = GetCollectionEntry(evt); if (collectionEntry != null && !collectionEntry.LoadedPersister.IsInverse) { OnCollectionAction(evt, null, collectionEntry.Snapshot, collectionEntry); } }
public Task OnPreRemoveCollectionAsync(PreCollectionRemoveEvent @event, CancellationToken cancellationToken) { try { AddEvent(@event, this); return(Task.CompletedTask); } catch (System.Exception ex) { return(Task.FromException <object>(ex)); } }
private void PreRemove() { IPreCollectionRemoveEventListener[] preListeners = Session.Listeners.PreCollectionRemoveEventListeners; if (preListeners.Length > 0) { PreCollectionRemoveEvent preEvent = new PreCollectionRemoveEvent(Persister, Collection, (IEventSource)Session, affectedOwner); for (int i = 0; i < preListeners.Length; i++) { preListeners[i].OnPreRemoveCollection(preEvent); } } }
private async Task PreRemoveAsync(CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); IPreCollectionRemoveEventListener[] preListeners = Session.Listeners.PreCollectionRemoveEventListeners; if (preListeners.Length > 0) { PreCollectionRemoveEvent preEvent = new PreCollectionRemoveEvent(Persister, Collection, (IEventSource)Session, affectedOwner); for (int i = 0; i < preListeners.Length; i++) { await(preListeners[i].OnPreRemoveCollectionAsync(preEvent, cancellationToken)).ConfigureAwait(false); } } }
public virtual void OnPreRemoveCollection(PreCollectionRemoveEvent evt) { var collectionEntry = getCollectionEntry(evt); if (collectionEntry == null) { return; } if (collectionEntry.LoadedPersister.IsInverse) { if (VerCfg.GlobalCfg.IsGlobalWithModifiedFlag) { initializeCollection(evt); } } else { var oldColl = !evt.Collection.WasInitialized && shouldGenerateRevision(evt) ? initializeCollection(evt) : collectionEntry.Snapshot; onCollectionAction(evt, null, oldColl, collectionEntry); } }
public void OnPreRemoveCollection(PreCollectionRemoveEvent @event) { AddEvent(@event, this); }
public Task OnPreRemoveCollectionAsync(PreCollectionRemoveEvent @event, CancellationToken cancellationToken) { OnPreRemoveCollection(@event); return(Task.CompletedTask); }
public void OnPreRemoveCollection(PreCollectionRemoveEvent e) { OnCollection(e); }
/// <summary> /// /// </summary> /// <param name="evt"></param> public override void OnPreRemoveCollection(PreCollectionRemoveEvent evt) { }
public void OnPreRemoveCollection(PreCollectionRemoveEvent @event) { log.Debug("OnPreRemoveCollection :" + @event); }