private void Clear() { OccupationTimer.Stop(); OccupationTimer = null; Torches.ForEach(t => t.Delete()); Torches.Clear(); }
private void Clear() { if (OccupationTimer != null) { OccupationTimer.Stop(); OccupationTimer = null; } for (var index = 0; index < Torches.Count; index++) { var t = Torches[index]; t.Delete(); } Torches.Clear(); }
public override void Delete() { base.Delete(); Torches.ForEach(t => t.Delete()); if (OccupationTimer != null) { OccupationTimer.Stop(); OccupationTimer = null; } if (CheckTimer != null) { CheckTimer.Stop(); CheckTimer = null; } }
public override void Delete() { base.Delete(); for (var index = 0; index < Torches.Count; index++) { var t = Torches[index]; t.Delete(); } if (OccupationTimer != null) { OccupationTimer.Stop(); OccupationTimer = null; } if (CheckTimer != null) { CheckTimer.Stop(); CheckTimer = null; } }