LotSizingDataModel.Solution 2.0.1
Solution objects for production, setup, inventory and related decisions.
Loading...
Searching...
No Matches
CashBalancePoint.cs
Go to the documentation of this file.
1using System;
2using System.Xml.Serialization;
3using LotSizingDataModel.Core.Common;
4
6
7[Serializable]
8[XmlType(TypeName = "cashBalancePoint")]
9public sealed class CashBalancePoint : ModelObject
10{
11 private int _period;
12 private double _balance;
13
14 [XmlAttribute("period")]
15 public int Period
16 {
17 get => _period;
18 set
19 {
20 if (value <= 0)
21 {
22 throw new ArgumentOutOfRangeException(nameof(value));
23 }
24
25 SetProperty(ref _period, value);
26 }
27 }
28
29 [XmlAttribute("balance")]
30 public double Balance
31 {
32 get => _balance;
33 set
34 {
35 if (!double.IsFinite(value))
36 {
37 throw new ArgumentOutOfRangeException(nameof(value));
38 }
39
40 SetProperty(ref _balance, value);
41 }
42 }
43}