Line | |
---|
1 | #region License Information
|
---|
2 | /*
|
---|
3 | * This file is part of SimSharp which is licensed under the MIT license.
|
---|
4 | * See the LICENSE file in the project root for more information.
|
---|
5 | */
|
---|
6 | #endregion
|
---|
7 |
|
---|
8 | using System;
|
---|
9 |
|
---|
10 | namespace SimSharp {
|
---|
11 | public class ContainerGet : Event {
|
---|
12 | public double Amount { get; protected set; }
|
---|
13 | public DateTime Time { get; private set; }
|
---|
14 | public Process Owner { get; set; }
|
---|
15 |
|
---|
16 | public ContainerGet(Simulation environment, Action<Event> callback, double amount)
|
---|
17 | : base(environment) {
|
---|
18 | if (amount <= 0) throw new ArgumentException("Amount must be > 0.", "amount");
|
---|
19 | Amount = amount;
|
---|
20 | CallbackList.Add(callback);
|
---|
21 | Time = environment.Now;
|
---|
22 | Owner = environment.ActiveProcess;
|
---|
23 | }
|
---|
24 | }
|
---|
25 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.