private protected virtual void ExecuteInsertNewBlock(IWriteableInsertBlockOperation operation) { Node ParentNode = operation.ParentNode; string PropertyName = operation.PropertyName; IWriteableBlockListInner <IWriteableBrowsingBlockNodeIndex> Inner = GetInner(ParentNode, PropertyName) as IWriteableBlockListInner <IWriteableBrowsingBlockNodeIndex>; Inner.InsertNewBlock(operation); IWriteableBrowsingExistingBlockNodeIndex BrowsingIndex = operation.BrowsingIndex; IWriteableBlockState BlockState = operation.BlockState; IWriteablePlaceholderNodeState ChildState = operation.ChildState; Debug.Assert(BlockState.StateList.Count == 1); Debug.Assert(BlockState.StateList[0] == ChildState); ((IWriteableBlockState <IWriteableInner <IWriteableBrowsingChildIndex> >)BlockState).InitBlockState(); Stats.BlockCount++; IWriteableBrowsingPatternIndex PatternIndex = BlockState.PatternIndex; IWriteablePatternState PatternState = BlockState.PatternState; AddState(PatternIndex, PatternState); Stats.PlaceholderNodeCount++; IWriteableBrowsingSourceIndex SourceIndex = BlockState.SourceIndex; IWriteableSourceState SourceState = BlockState.SourceState; AddState(SourceIndex, SourceState); Stats.PlaceholderNodeCount++; AddState(BrowsingIndex, ChildState); Stats.PlaceholderNodeCount++; BuildStateTable(Inner, null, BrowsingIndex, ChildState); Debug.Assert(Contains(BrowsingIndex)); NotifyBlockStateInserted(operation); }
/// <summary> /// Initializes a new instance of the <see cref="WriteablePatternStateView"/> class. /// </summary> /// <param name="controllerView">The controller view to which this object belongs.</param> /// <param name="state">The pattern state.</param> public WriteablePatternStateView(WriteableControllerView controllerView, IWriteablePatternState state) : base(controllerView, state) { }