public ListBlockContextBase(IListBlockRepository listBlockRepository,
                                    ITaskExecutionRepository taskExecutionRepository,
                                    string applicationName,
                                    string taskName,
                                    string taskExecutionId,
                                    ListUpdateMode listUpdateMode,
                                    int uncommittedThreshold,
                                    ListBlock <TItem, THeader> listBlock,
                                    string blockExecutionId,
                                    int maxStatusReasonLength,
                                    string forcedBlockQueueId = "0")
        {
            _listBlockRepository     = listBlockRepository;
            _taskExecutionRepository = taskExecutionRepository;
            _blockWithHeader         = listBlock;
            BlockExecutionId         = blockExecutionId;
            ListUpdateMode           = listUpdateMode;
            ForcedBlockQueueId       = forcedBlockQueueId;
            UncommittedThreshold     = uncommittedThreshold;
            _applicationName         = applicationName;
            _taskName              = taskName;
            _taskExecutionId       = taskExecutionId;
            _maxStatusReasonLength = maxStatusReasonLength;

            if (listUpdateMode != ListUpdateMode.SingleItemCommit)
            {
                _uncommittedItems = new List <IListBlockItem <TItem> >();
            }

            _completed = false;
            _hasHeader = true;
        }
示例#2
0
 public ListBlockContext(IListBlockRepository listBlockRepository,
                         ITaskExecutionRepository taskExecutionRepository,
                         string applicationName,
                         string taskName,
                         string taskExecutionId,
                         ListUpdateMode listUpdateMode,
                         int uncommittedThreshold,
                         ListBlock <T> listBlock,
                         string blockExecutionId,
                         int maxStatusReasonLength,
                         string forcedBlockQueueId = "0")
     : base(listBlockRepository,
            taskExecutionRepository,
            applicationName,
            taskName,
            taskExecutionId,
            listUpdateMode,
            uncommittedThreshold,
            listBlock,
            blockExecutionId,
            maxStatusReasonLength,
            forcedBlockQueueId)
 {
     _headerlessBlock.SetParentContext(this);
 }