Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        public Productivity GetProductivity(IEnumerable <EmployeeActionBase> employeeActions, OperationThresholds thresholds, ShortBreakSchedule breaks = null, Shift shift = null)
        {
            foreach (var action in employeeActions)
            {
            }

            throw new NotImplementedException();
        }