/// <inheritdoc/>
 public override void Detach(ReadOnlyControllerView view, ReadOnlyAttachCallbackSet callbackSet)
 {
     foreach (IReadOnlyNodeState ChildState in StateList)
     {
         ((IReadOnlyNodeState <IReadOnlyInner <IReadOnlyBrowsingChildIndex> >)ChildState).Detach(view, callbackSet);
     }
 }
        /// <inheritdoc/>
        public override void Detach(ReadOnlyControllerView view, ReadOnlyAttachCallbackSet callbackSet)
        {
            foreach (IReadOnlyBlockState BlockState in BlockStateList)
            {
                ((IReadOnlyBlockState <IReadOnlyInner <IReadOnlyBrowsingChildIndex> >)BlockState).Detach(view, callbackSet);
            }

            callbackSet.OnBlockListInnerDetached(this);
        }
示例#3
0
        /// <summary>
        /// Initializes the view by attaching it to the controller.
        /// </summary>
        private protected virtual void Init()
        {
            ReadOnlyAttachCallbackSet CallbackSet = CreateCallbackSet();

            ((IReadOnlyControllerInternal)Controller).Attach(this, CallbackSet);

            Debug.Assert(StateViewTable.Count == Controller.Stats.NodeCount);
            Debug.Assert(BlockStateViewTable.Count == Controller.Stats.BlockCount);

            InitAddEvents();
        }
        /// <summary>
        /// Detach a view from the block state.
        /// </summary>
        /// <param name="view">The attaching view.</param>
        /// <param name="callbackSet">The set of callbacks to no longer call when enumerating existing states.</param>
        public virtual void Detach(ReadOnlyControllerView view, ReadOnlyAttachCallbackSet callbackSet)
        {
            foreach (IReadOnlyNodeState ChildState in StateList)
            {
                ((IReadOnlyNodeState <IInner>)ChildState).Detach(view, callbackSet);
            }

            ((IReadOnlySourceState <IInner>)SourceState).Detach(view, callbackSet);
            ((IReadOnlyPatternState <IInner>)PatternState).Detach(view, callbackSet);

            callbackSet.OnBlockStateDetached(this);
        }
示例#5
0
        private protected virtual void DisposeNow()
        {
            Controller.NodeStateCreated      -= OnNodeStateCreated;
            Controller.NodeStateInitialized  -= OnNodeStateInitialized;
            Controller.NodeStateRemoved      -= OnNodeStateRemoved;
            Controller.BlockListInnerCreated -= OnBlockListInnerCreated;

            ReadOnlyAttachCallbackSet CallbackSet = CreateCallbackSet();

            ((IReadOnlyControllerInternal)Controller).Detach(this, CallbackSet);

            Debug.Assert(StateViewTable.Count == 0);
            Debug.Assert(BlockStateViewTable.Count == 0);
        }
示例#6
0
 /// <summary>
 /// DEtach a view from the inner.
 /// </summary>
 /// <param name="view">The attaching view.</param>
 /// <param name="callbackSet">The set of callbacks to no longer call when enumerating existing states.</param>
 public abstract void Detach(ReadOnlyControllerView view, ReadOnlyAttachCallbackSet callbackSet);
示例#7
0
 /// <inheritdoc/>
 public override void Attach(ReadOnlyControllerView view, ReadOnlyAttachCallbackSet callbackSet)
 {
     ((IReadOnlyOptionalNodeState <IReadOnlyInner <IReadOnlyBrowsingChildIndex> >)ChildState).Attach(view, callbackSet);
 }
 /// <inheritdoc/>
 public virtual void Detach(ReadOnlyControllerView view, ReadOnlyAttachCallbackSet callbackSet)
 {
     ((IReadOnlyPlaceholderNodeState <IReadOnlyInner <IReadOnlyBrowsingChildIndex> >)RootState).Detach(view, callbackSet);
 }