Esempio n. 1
0
        public Block CreateBlock(int index, string subject)
        {
            switch (_startTime.BlockType)
            {
            case "RegularBlock": return(new RegularBlock(_startTime.For(index), subject));

            case "DoubleBlock": return(new DoubleBlock(_startTime.For(index), subject));

            default: throw new NotSupportedException($"Unsupported block type '{_startTime.BlockType}'!");
            }
        }
Esempio n. 2
0
        public TimeSpan For(int index)
        {
            var breakStart = _breakStart.For(index);
            var nextBlock  = _blockStartTime.For(index + 1);

            return(nextBlock.Subtract(breakStart));
        }
Esempio n. 3
0
        public TimeSpan For(int index)
        {
            var block = _blockStartTime.For(index);

            return(block.Add(_blockDuration));
        }