/// <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}"));
     }
 }
Exemple #2
0
        /// <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));
            }
        }
Exemple #3
0
 /// <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}"));
     }
 }
Exemple #4
0
 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));
        }
Exemple #6
0
 public TreeUpdatedEventArgs(TreeUpdateType updateType) => UpdateType = updateType;
Exemple #7
0
 /// <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}"));
     }
 }