コード例 #1
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 override void Detach(IReadOnlyControllerView view, IReadOnlyAttachCallbackSet callbackSet)
 {
     foreach (IReadOnlyNodeState ChildState in StateList)
     {
         ((IReadOnlyNodeState <IReadOnlyInner <IReadOnlyBrowsingChildIndex> >)ChildState).Detach(view, callbackSet);
     }
 }
コード例 #2
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 override void Detach(IReadOnlyControllerView view, IReadOnlyAttachCallbackSet callbackSet)
        {
            foreach (IReadOnlyBlockState BlockState in BlockStateList)
            {
                ((IReadOnlyBlockState <IReadOnlyInner <IReadOnlyBrowsingChildIndex> >)BlockState).Detach(view, callbackSet);
            }

            callbackSet.OnBlockListInnerDetached(this);
        }
コード例 #3
0
        /// <summary>
        /// Detach a view to the 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(IReadOnlyControllerView view, IReadOnlyAttachCallbackSet callbackSet)
        {
            foreach (KeyValuePair <string, IReadOnlyInner> Entry in InnerTable)
            {
                IReadOnlyInner Inner = Entry.Value;
                ((IReadOnlyInner <IReadOnlyBrowsingChildIndex>)Inner).Detach(view, callbackSet);
            }

            callbackSet.OnNodeStateDetached(this);
        }
コード例 #4
0
        /// <summary>
        /// Initializes the view by attaching it to the controller.
        /// </summary>
        private protected virtual void Init()
        {
            IReadOnlyAttachCallbackSet CallbackSet = CreateCallbackSet();

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

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

            InitAddEvents();
        }
コード例 #5
0
        /// <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(IReadOnlyControllerView view, IReadOnlyAttachCallbackSet 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);
        }
コード例 #6
0
        private protected virtual void DisposeNow()
        {
            Controller.NodeStateCreated      -= OnNodeStateCreated;
            Controller.NodeStateInitialized  -= OnNodeStateInitialized;
            Controller.NodeStateRemoved      -= OnNodeStateRemoved;
            Controller.BlockListInnerCreated -= OnBlockListInnerCreated;

            IReadOnlyAttachCallbackSet CallbackSet = CreateCallbackSet();

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

            Debug.Assert(StateViewTable.Count == 0);
            Debug.Assert(BlockStateViewTable.Count == 0);
        }
コード例 #7
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(IReadOnlyControllerView view, IReadOnlyAttachCallbackSet callbackSet);
コード例 #8
0
 /// <summary>
 /// Attach a view to the inner.
 /// </summary>
 /// <param name="view">The attaching view.</param>
 /// <param name="callbackSet">The set of callbacks to call when enumerating existing states.</param>
 public override void Attach(IReadOnlyControllerView view, IReadOnlyAttachCallbackSet callbackSet)
 {
     ((IReadOnlyOptionalNodeState <IReadOnlyInner <IReadOnlyBrowsingChildIndex> >)ChildState).Attach(view, callbackSet);
 }