aboutsummaryrefslogtreecommitdiff
path: root/src/dtf/WixToolset.Dtf.WindowsInstaller/InstallCost.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dtf/WixToolset.Dtf.WindowsInstaller/InstallCost.cs')
-rw-r--r--src/dtf/WixToolset.Dtf.WindowsInstaller/InstallCost.cs67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/dtf/WixToolset.Dtf.WindowsInstaller/InstallCost.cs b/src/dtf/WixToolset.Dtf.WindowsInstaller/InstallCost.cs
new file mode 100644
index 00000000..f29612d6
--- /dev/null
+++ b/src/dtf/WixToolset.Dtf.WindowsInstaller/InstallCost.cs
@@ -0,0 +1,67 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset.Dtf.WindowsInstaller
4{
5 using System.Diagnostics.CodeAnalysis;
6
7 /// <summary>
8 /// Represents a per-drive disk space cost for an installation.
9 /// </summary>
10 [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
11 public struct InstallCost
12 {
13 private string driveName;
14 private long cost;
15 private long tempCost;
16
17 /// <summary>
18 /// Creates a new InstallCost object.
19 /// </summary>
20 /// <param name="driveName">name of the drive this cost data applies to</param>
21 /// <param name="cost">installation cost on this drive, as a number of bytes</param>
22 /// <param name="tempCost">temporary disk space required on this drive, as a number of bytes</param>
23 internal InstallCost(string driveName, long cost, long tempCost)
24 {
25 this.driveName = driveName;
26 this.cost = cost;
27 this.tempCost = tempCost;
28 }
29
30 /// <summary>
31 /// The name of the drive this cost data applies to.
32 /// </summary>
33 public string DriveName
34 {
35 get
36 {
37 return this.driveName;
38 }
39 }
40
41 /// <summary>
42 /// The installation cost on this drive, as a number of bytes.
43 /// </summary>
44 public long Cost
45 {
46 get
47 {
48 return this.cost;
49 }
50 }
51
52 /// <summary>
53 /// The temporary disk space required on this drive, as a number of bytes.
54 /// </summary>
55 /// <remarks><p>
56 /// This temporary space requirement is space needed only for the duration
57 /// of the installation, over the final footprint on disk.
58 /// </p></remarks>
59 public long TempCost
60 {
61 get
62 {
63 return this.tempCost;
64 }
65 }
66 }
67}