/// <summary> /// Fires 'update end' event on the main thread context /// </summary> internal void FireOnUpdateCompleted(TreeUpdateType updateType) { Check.InvalidOperation(() => Thread.CurrentThread.ManagedThreadId == _ownerThread, _threadCheckMessage); try { UpdateCompleted?.Invoke(this, new TreeUpdatedEventArgs(updateType)); } catch (Exception ex) { Debug.Assert(false, Invariant($"Exception thrown in a tree.UpdateCompleted event handler: {ex.Message}")); } }
/// <summary> /// Fires 'update end' event on the main thread context /// </summary> internal void FireOnUpdateCompleted(TreeUpdateType updateType) { if (_ownerThread != Thread.CurrentThread.ManagedThreadId) { Debug.Fail(_threadContextInvalidMessage); return; } if (UpdateCompleted != null) { UpdateCompleted(this, new TreeUpdatedEventArgs(updateType)); } }
/// <summary> /// Fires 'update end' event on the main thread context /// </summary> internal void FireOnUpdateCompleted(TreeUpdateType updateType) { if (_ownerThread != Thread.CurrentThread.ManagedThreadId) { Debug.Fail(_threadContextInvalidMessage); return; } try { UpdateCompleted?.Invoke(this, new TreeUpdatedEventArgs(updateType)); } catch (Exception ex) { Debug.Assert(false, Invariant($"Exception thrown in a tree.UpdateCompleted event handler: {ex.Message}")); } }
public TreeUpdatedEventArgs(TreeUpdateType updateType) { UpdateType = updateType; }
/// <summary> /// Fires 'update end' event on the main thread context /// </summary> internal void FireOnUpdateCompleted(TreeUpdateType updateType) { if (_ownerThread != Thread.CurrentThread.ManagedThreadId) { Debug.Fail(_threadContextInvalidMessage); return; } if (UpdateCompleted != null) UpdateCompleted(this, new TreeUpdatedEventArgs(updateType)); }
public TreeUpdatedEventArgs(TreeUpdateType updateType) => UpdateType = updateType;
/// <summary> /// Fires 'update end' event on the main thread context /// </summary> internal void FireOnUpdateCompleted(TreeUpdateType updateType) { if (_ownerThread != Thread.CurrentThread.ManagedThreadId) { Debug.Fail(_threadContextInvalidMessage); return; } try { UpdateCompleted?.Invoke(this, new TreeUpdatedEventArgs(updateType)); } catch (Exception ex) { Debug.Assert(false, Invariant($"Exception thrown in a tree.UpdateCompleted event handler: {ex.Message}")); } }