main
cs 82 lines 3.36 KB
Raw
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
3 namespace WixToolset.Core.WindowsInstaller.Bind
4 {
5 using System.Collections.Generic;
6 using WixToolset.Data;
7 using WixToolset.Data.Symbols;
8 using WixToolset.Extensibility.Data;
9
10 /// <summary>
11 /// A cabinet builder work item.
12 /// </summary>
13 internal sealed class CabinetWorkItem
14 {
15 /// <summary>
16 /// Instantiate a new CabinetWorkItem.
17 /// </summary>
18 /// <param name="sourceLineNumber">Source line number that requires the cabinet creation.</param>
19 /// <param name="diskId"></param>
20 /// <param name="fileFacades">The collection of files in this cabinet.</param>
21 /// <param name="hashesByFileId">The hashes for unversioned files.</param>
22 /// <param name="cabinetFile">The cabinet file.</param>
23 /// <param name="maxThreshold">Maximum threshold for each cabinet.</param>
24 /// <param name="compressionLevel">The compression level of the cabinet.</param>
25 /// <param name="modularizationSuffix">Modularization suffix used when building a Merge Module.</param>
26 public CabinetWorkItem(SourceLineNumber sourceLineNumber, int diskId, string cabinetFile, IEnumerable<IFileFacade> fileFacades, Dictionary<string, MsiFileHashSymbol> hashesByFileId, int maxThreshold, CompressionLevel compressionLevel, string modularizationSuffix)
27 {
28 this.SourceLineNumber = sourceLineNumber;
29 this.DiskId = diskId;
30 this.CabinetFile = cabinetFile;
31 this.CompressionLevel = compressionLevel;
32 this.ModularizationSuffix = modularizationSuffix;
33 this.FileFacades = fileFacades;
34 this.HashesByFileId = hashesByFileId;
35 this.MaxThreshold = maxThreshold;
36 }
37
38 /// <summary>
39 /// Source line that requires the cabinet creation.
40 /// </summary>
41 public SourceLineNumber SourceLineNumber { get; }
42
43 /// <summary>
44 /// Gets the Media symbol's DiskId that requires the cabinet.
45 /// </summary>
46 public int DiskId { get; }
47
48 /// <summary>
49 /// Gets the cabinet file.
50 /// </summary>
51 /// <value>The cabinet file.</value>
52 public string CabinetFile { get; }
53
54 /// <summary>
55 /// Gets the compression level of the cabinet.
56 /// </summary>
57 /// <value>The compression level of the cabinet.</value>
58 public CompressionLevel CompressionLevel { get; }
59
60 /// <summary>
61 /// Gets the modularization suffix used when building a Merge Module.
62 /// </summary>
63 public string ModularizationSuffix { get; }
64
65 /// <summary>
66 /// Gets the collection of files in this cabinet.
67 /// </summary>
68 /// <value>The collection of files in this cabinet.</value>
69 public IEnumerable<IFileFacade> FileFacades { get; }
70
71 /// <summary>
72 /// The hashes for unversioned files.
73 /// </summary>
74 public Dictionary<string, MsiFileHashSymbol> HashesByFileId { get; }
75
76 /// <summary>
77 /// Gets the max threshold.
78 /// </summary>
79 /// <value>The maximum threshold for a folder in a cabinet.</value>
80 public int MaxThreshold { get; }
81 }
82 }