public static DayFactory Create(BlockStartTime blockStart) { var kernel = new StandardKernel(); kernel.Bind <BlockStartTime>().ToConstant(blockStart); return(kernel.Get <DayFactory>()); }
public static Table FromPersistenceTable(Persistence.Table table) { var blockType = new BlockStartTime(table.BlockStartTimes).BlockType; var weekdays = table.Weekdays.Select(w => FromPersistenceDay(w, blockType)); return(new Table(table.Id, weekdays)); }
public static Persistence.Table ToPersistenceTable(BlockStartTime startTimes, Table table) { return(new Persistence.Table { BlockStartTimes = startTimes.ToArray(), Weekdays = ToPersistence(table.Days).ToArray() }); }
private static Block FromPersistenceBlock(Persistence.Block b, string blockType) { var begin = BlockStartTime.FromString(b.Begin); return(Block.Create(begin, b.Name, blockType)); }
public BreakDuration(BlockStartTime blockStartTime, BreakStartTime breakStart) { _blockStartTime = blockStartTime; _blockDuration = blockStartTime.BlockDuration; _breakStart = breakStart; }
public BreakStartTime(BlockStartTime blockStartTime) { _blockStartTime = blockStartTime; _blockDuration = blockStartTime.BlockDuration; }
public BlockFactory(BlockStartTime startTime) { _startTime = startTime; }