/// <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); } }
/// <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); }
/// <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); }
/// <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(); }
/// <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); }
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); }
/// <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);
/// <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); }