public override void Write(Suite.TestCaseRef testCaseRef, System.Collections.Generic.IList <Suite.TestCaseAction> actions) { this.workSheet.Cells[this.currentRow, 2].Value = testCaseRef.Name; this.workSheet.Cells[this.currentRow, 5].Value = actions.Any(item => item.Status == TestResultType.Fail) ? TestResultType.Fail.ToString() : TestResultType.Success.ToString(); this.workSheet.Cells[this.currentRow, 6].Value = testCaseRef.Description; this.currentRow++; }
override public void OnMove(GoRogue.FOV playerFov, System.Collections.Generic.IList <Entity> monsters) { if (this.CurrentShield < KlogborgShield.MaxShield && !monsters.Any(m => playerFov.BooleanFOV[m.X, m.Y] == true)) { this.CurrentShield = KlogborgShield.MaxShield; } }
public override void OnBeaconSighting(Com.Gimbal.Android.BeaconSighting p0, System.Collections.Generic.IList <Com.Gimbal.Android.Visit> p1) { if (p1 != null && p1.Any()) { foreach (var p in p1) { Log.Info(TAG, "OnBeaconSighting Entered place: " + p.Place.Name + "Entrance date: " + p.ArrivalTimeInMillis.FromUnixTime().GetValueOrDefault().ToString("O")); } } }
public byte FindRfAddress(System.Collections.Generic.IList <byte> exisitingRfAddresses) { if (!exisitingRfAddresses.Any()) { return(1); } var maxExisting = exisitingRfAddresses.Max(); var holes = Enumerable.Range(1, maxExisting).Select(i => (byte)i).Where(i => !exisitingRfAddresses.Contains(i)).ToList(); if (holes.Count >= MaxSupportedConcurrentRequest) { return(holes [_rnd.Next(holes.Count - 1)]); } return((byte)(_rnd.Next(maxExisting + 1, Math.Min(maxExisting + 1 + MaxSupportedConcurrentRequest, 250)))); }
protected override void OnExecute() { System.DateTime now = CurrentRequestData.Now; System.Collections.Generic.IList <Webpage> due = _session.QueryOver <Webpage>().Where(x => !x.Published && x.PublishOn <= now).List(); if (!due.Any()) { return; } using (new NotificationDisabler()) { _session.Transact(session => { foreach (Webpage webpage in due) { webpage.Published = true; session.Update(webpage); } }); } }