diff options
author | Rob Mensching <rob@firegiant.com> | 2017-10-14 16:12:07 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2017-10-14 16:12:07 -0700 |
commit | dbde9e7104b907bbbaea17e21247d8cafc8b3a4c (patch) | |
tree | 0f5fbbb6fe12c6b2e5e622a0e18ce4c5b4eb2b96 /src/WixToolset.Core/Cab | |
parent | fbf986eb97f68396797a89fc7d40dec07b775440 (diff) | |
download | wix-dbde9e7104b907bbbaea17e21247d8cafc8b3a4c.tar.gz wix-dbde9e7104b907bbbaea17e21247d8cafc8b3a4c.tar.bz2 wix-dbde9e7104b907bbbaea17e21247d8cafc8b3a4c.zip |
Massive refactoring to introduce the concept of IBackend
Diffstat (limited to 'src/WixToolset.Core/Cab')
-rw-r--r-- | src/WixToolset.Core/Cab/CabinetFileInfo.cs | 39 | ||||
-rw-r--r-- | src/WixToolset.Core/Cab/WixCreateCab.cs | 4 | ||||
-rw-r--r-- | src/WixToolset.Core/Cab/WixEnumerateCab.cs | 6 | ||||
-rw-r--r-- | src/WixToolset.Core/Cab/WixExtractCab.cs | 3 |
4 files changed, 16 insertions, 36 deletions
diff --git a/src/WixToolset.Core/Cab/CabinetFileInfo.cs b/src/WixToolset.Core/Cab/CabinetFileInfo.cs index 849bb3bb..816f9e3e 100644 --- a/src/WixToolset.Core/Cab/CabinetFileInfo.cs +++ b/src/WixToolset.Core/Cab/CabinetFileInfo.cs | |||
@@ -1,19 +1,12 @@ | |||
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. | 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 | 2 | ||
3 | namespace WixToolset | 3 | namespace WixToolset.Core.Cab |
4 | { | 4 | { |
5 | using System; | ||
6 | |||
7 | /// <summary> | 5 | /// <summary> |
8 | /// Properties of a file in a cabinet. | 6 | /// Properties of a file in a cabinet. |
9 | /// </summary> | 7 | /// </summary> |
10 | internal sealed class CabinetFileInfo | 8 | public sealed class CabinetFileInfo |
11 | { | 9 | { |
12 | private string fileId; | ||
13 | private ushort date; | ||
14 | private ushort time; | ||
15 | private int size; | ||
16 | |||
17 | /// <summary> | 10 | /// <summary> |
18 | /// Constructs CabinetFileInfo | 11 | /// Constructs CabinetFileInfo |
19 | /// </summary> | 12 | /// </summary> |
@@ -22,43 +15,31 @@ namespace WixToolset | |||
22 | /// <param name="time">Last modified time (MS-DOS time)</param> | 15 | /// <param name="time">Last modified time (MS-DOS time)</param> |
23 | public CabinetFileInfo(string fileId, ushort date, ushort time, int size) | 16 | public CabinetFileInfo(string fileId, ushort date, ushort time, int size) |
24 | { | 17 | { |
25 | this.fileId = fileId; | 18 | this.FileId = fileId; |
26 | this.date = date; | 19 | this.Date = date; |
27 | this.time = time; | 20 | this.Time = time; |
28 | this.size = size; | 21 | this.Size = size; |
29 | } | 22 | } |
30 | 23 | ||
31 | /// <summary> | 24 | /// <summary> |
32 | /// Gets the file Id of the file. | 25 | /// Gets the file Id of the file. |
33 | /// </summary> | 26 | /// </summary> |
34 | /// <value>file Id</value> | 27 | /// <value>file Id</value> |
35 | public string FileId | 28 | public string FileId { get; } |
36 | { | ||
37 | get { return this.fileId; } | ||
38 | } | ||
39 | 29 | ||
40 | /// <summary> | 30 | /// <summary> |
41 | /// Gets modified date (DOS format). | 31 | /// Gets modified date (DOS format). |
42 | /// </summary> | 32 | /// </summary> |
43 | public ushort Date | 33 | public ushort Date { get; } |
44 | { | ||
45 | get { return this.date; } | ||
46 | } | ||
47 | 34 | ||
48 | /// <summary> | 35 | /// <summary> |
49 | /// Gets modified time (DOS format). | 36 | /// Gets modified time (DOS format). |
50 | /// </summary> | 37 | /// </summary> |
51 | public ushort Time | 38 | public ushort Time { get; } |
52 | { | ||
53 | get { return this.time; } | ||
54 | } | ||
55 | 39 | ||
56 | /// <summary> | 40 | /// <summary> |
57 | /// Gets the size of the file in bytes. | 41 | /// Gets the size of the file in bytes. |
58 | /// </summary> | 42 | /// </summary> |
59 | public int Size | 43 | public int Size { get; } |
60 | { | ||
61 | get { return this.size; } | ||
62 | } | ||
63 | } | 44 | } |
64 | } | 45 | } |
diff --git a/src/WixToolset.Core/Cab/WixCreateCab.cs b/src/WixToolset.Core/Cab/WixCreateCab.cs index 8f985a43..4ebdd1c0 100644 --- a/src/WixToolset.Core/Cab/WixCreateCab.cs +++ b/src/WixToolset.Core/Cab/WixCreateCab.cs | |||
@@ -1,12 +1,12 @@ | |||
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. | 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 | 2 | ||
3 | namespace WixToolset.Cab | 3 | namespace WixToolset.Core.Cab |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Globalization; | 6 | using System.Globalization; |
7 | using System.IO; | 7 | using System.IO; |
8 | using System.Runtime.InteropServices; | 8 | using System.Runtime.InteropServices; |
9 | using WixToolset.Bind.Databases; | 9 | using WixToolset.Core.Bind; |
10 | using WixToolset.Core.Native; | 10 | using WixToolset.Core.Native; |
11 | using WixToolset.Data; | 11 | using WixToolset.Data; |
12 | 12 | ||
diff --git a/src/WixToolset.Core/Cab/WixEnumerateCab.cs b/src/WixToolset.Core/Cab/WixEnumerateCab.cs index 017eeffb..0b4055d6 100644 --- a/src/WixToolset.Core/Cab/WixEnumerateCab.cs +++ b/src/WixToolset.Core/Cab/WixEnumerateCab.cs | |||
@@ -1,6 +1,6 @@ | |||
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. | 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 | 2 | ||
3 | namespace WixToolset.Cab | 3 | namespace WixToolset.Core.Cab |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
@@ -10,7 +10,7 @@ namespace WixToolset.Cab | |||
10 | /// <summary> | 10 | /// <summary> |
11 | /// Wrapper class around interop with wixcab.dll to enumerate files from a cabinet. | 11 | /// Wrapper class around interop with wixcab.dll to enumerate files from a cabinet. |
12 | /// </summary> | 12 | /// </summary> |
13 | internal sealed class WixEnumerateCab : IDisposable | 13 | public sealed class WixEnumerateCab : IDisposable |
14 | { | 14 | { |
15 | private bool disposed; | 15 | private bool disposed; |
16 | private List<CabinetFileInfo> fileInfoList; | 16 | private List<CabinetFileInfo> fileInfoList; |
@@ -38,7 +38,7 @@ namespace WixToolset.Cab | |||
38 | /// </summary> | 38 | /// </summary> |
39 | /// <param name="cabinetFile">path to cabinet</param> | 39 | /// <param name="cabinetFile">path to cabinet</param> |
40 | /// <returns>list of CabinetFileInfo</returns> | 40 | /// <returns>list of CabinetFileInfo</returns> |
41 | internal List<CabinetFileInfo> Enumerate(string cabinetFile) | 41 | public List<CabinetFileInfo> Enumerate(string cabinetFile) |
42 | { | 42 | { |
43 | this.fileInfoList = new List<CabinetFileInfo>(); | 43 | this.fileInfoList = new List<CabinetFileInfo>(); |
44 | 44 | ||
diff --git a/src/WixToolset.Core/Cab/WixExtractCab.cs b/src/WixToolset.Core/Cab/WixExtractCab.cs index debdaf15..e776b08e 100644 --- a/src/WixToolset.Core/Cab/WixExtractCab.cs +++ b/src/WixToolset.Core/Cab/WixExtractCab.cs | |||
@@ -1,9 +1,8 @@ | |||
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. | 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 | 2 | ||
3 | namespace WixToolset.Cab | 3 | namespace WixToolset.Core.Cab |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Runtime.InteropServices; | ||
7 | using WixToolset.Core.Native; | 6 | using WixToolset.Core.Native; |
8 | 7 | ||
9 | /// <summary> | 8 | /// <summary> |