Exemplo n.º 1
0
        internal void AddToRenderQueue(RenderQueueEntry renderQueueEntry)
        {
            _batchBuilder.ComponentRenderQueue.Enqueue(renderQueueEntry);

            if (!_isBatchInProgress)
            {
                ProcessRenderQueue();
            }
        }
Exemplo n.º 2
0
        private void RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
        {
            renderQueueEntry.ComponentState
            .RenderIntoBatch(_batchBuilder, renderQueueEntry.RenderFragment);

            // Process disposal queue now in case it causes further component renders to be enqueued
            while (_batchBuilder.ComponentDisposalQueue.Count > 0)
            {
                var disposeComponentId = _batchBuilder.ComponentDisposalQueue.Dequeue();
                GetRequiredComponentState(disposeComponentId).DisposeInBatch(_batchBuilder);
                _componentStateById.Remove(disposeComponentId);
                _batchBuilder.DisposedComponentIds.Append(disposeComponentId);
            }
        }