Changeset 16779 for trunk/HeuristicLab.ExtLibs/HeuristicLab.SimSharp/3.1.1/SimSharp-3.1.1/Core/Events/Event.cs
- Timestamp:
- 04/12/19 13:45:11 (5 years ago)
- Location:
- trunk/HeuristicLab.ExtLibs/HeuristicLab.SimSharp/3.1.1
- Files:
-
- 1 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.ExtLibs/HeuristicLab.SimSharp/3.1.1/SimSharp-3.1.1/Core/Events/Event.cs
r15972 r16779 1 1 #region License Information 2 2 /* SimSharp - A .NET port of SimPy, discrete event simulation framework 3 Copyright (C) 201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 Copyright (C) 2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 5 5 This program is free software: you can redistribute it and/or modify … … 36 36 /// </summary> 37 37 public class Event { 38 protected internal EnvironmentEnvironment { get; private set; }38 protected internal Simulation Environment { get; private set; } 39 39 protected List<Action<Event>> CallbackList { get; set; } 40 40 … … 73 73 public bool IsTriggered { get; protected set; } 74 74 75 public Event( Environmentenvironment) {75 public Event(Simulation environment) { 76 76 Environment = environment; 77 77 CallbackList = new List<Action<Event>>(); … … 186 186 if (IsProcessed) throw new InvalidOperationException("Event has already been processed."); 187 187 IsProcessed = true; 188 for each (var callback in CallbackList)189 callback(this);188 for (var i = 0; i < CallbackList.Count; i++) 189 CallbackList[i](this); 190 190 CallbackList = null; 191 191 }
Note: See TracChangeset
for help on using the changeset viewer.