Esempio n. 1
0
 private static TemporaryExposureKeyArgs Map(EksCreateJobInputEntity c)
 => new TemporaryExposureKeyArgs
 {
     RollingPeriod         = c.RollingPeriod,
     TransmissionRiskLevel = c.TransmissionRiskLevel,
     KeyData            = c.KeyData,
     RollingStartNumber = c.RollingStartNumber
 };
        public EksCreateJobInputEntity[] Execute(StuffingArgs args)
        {
            _Args = args ?? throw new ArgumentNullException();
            if (args.Count < 1)
            {
                throw new ArgumentOutOfRangeException(nameof(args), "Count < 1");
            }

            var result = new EksCreateJobInputEntity[args.Count];

            for (var i = 0; i < args.Count; i++)
            {
                result[i] = new EksCreateJobInputEntity
                {
                    RollingPeriod         = _TekValidatorConfig.RollingPeriodMax, //Could randomise - would need > 1 Tek for current date to look legit.
                    RollingStartNumber    = GetRandomRollingStartNumber(),
                    KeyData               = _Random.NextByteArray(_TekValidatorConfig.KeyDataLength),
                    TransmissionRiskLevel = TransmissionRiskLevel.Low
                };
            }

            return(result);
        }