Exemplo n.º 1
0
 /// <summary>
 /// Инициализирует новый экземпляр класса <see cref="T:System.Object"/>.
 /// </summary>
 public Beehive(int number, int maximumNumberOfBees)
 {
     Number = number;
     MaximumNumberOfBees = maximumNumberOfBees;
     bees    = new Collection <IBee>();
     changed = new TypedWeakEventHandler <IBeehive, BeehiveChangedEventArgs>();
 }
Exemplo n.º 2
0
 public SimulationSession(Collection <IBeehive> beehives, TimeSpan updateInterval, Action cleanup)
     : base(cleanup)
 {
     started  = DateTime.Now;
     Beehives = beehives;
     updated  = new TypedWeakEventHandler <ISimulationSession, SessionUpdatedEventArgs>();
     timer    = new Timer(DoTimerCallback, null, TimeSpan.Zero, updateInterval);
 }
Exemplo n.º 3
0
 public ActionDispatcher()
 {
     actions       = new Dictionary <WellKnownActions, WellKnownAction>();
     executeAction = new TypedWeakEventHandler <ActionDispatcher, DispatcherActionExecuteEventArgs>();
 }
Exemplo n.º 4
0
 /// <summary>
 /// Инициализирует новый экземпляр класса <see cref="T:System.Object"/>.
 /// </summary>
 public ApplicationOptionProvider()
 {
     optionsChanged = new TypedWeakEventHandler <IApplicationOptionsProvider, OptionsChangedEventArgs>();
     cache          = new RuntimeDataCache <ApplicationOptions>(TimeSpan.FromMilliseconds(100.0d));
 }