/// <summary> /// Invokes if thresholds have not created and have not saved in file. /// </summary> /// <returns></returns> private OperationThresholds GetNewThresholds() { var operations = _dbContext.GetOperations().ToArray(); var thresholds = new OperationThresholds( ); foreach (var operation in operations) { thresholds[operation] = 20; } return(thresholds); }
private void ReadThresholds() { if (!File.Exists("thresholds.bin")) { _thresholds = GetNewThresholds(); WriteThresholds(); return; } using (var stream = File.OpenRead(THRESHOLD_FILE)) { stream.Position = 0; _thresholds = ( OperationThresholds )_formatter.Deserialize(stream); } }
public Productivity GetProductivity(IEnumerable <EmployeeActionBase> employeeActions, OperationThresholds thresholds, ShortBreakSchedule breaks = null, Shift shift = null) { foreach (var action in employeeActions) { } throw new NotImplementedException(); }