aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Bind/FileFacade.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/Bind/FileFacade.cs')
-rw-r--r--src/WixToolset.Core/Bind/FileFacade.cs24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/WixToolset.Core/Bind/FileFacade.cs b/src/WixToolset.Core/Bind/FileFacade.cs
index 7bfdb9bb..f0ce14ca 100644
--- a/src/WixToolset.Core/Bind/FileFacade.cs
+++ b/src/WixToolset.Core/Bind/FileFacade.cs
@@ -15,18 +15,27 @@ namespace WixToolset.Core.Bind
15 { 15 {
16 this.FileTuple = file; 16 this.FileTuple = file;
17 this.AssemblyTuple = assembly; 17 this.AssemblyTuple = assembly;
18
19 this.Identifier = file.Id;
20 this.ComponentRef = file.ComponentRef;
18 } 21 }
19 22
20 public FileFacade(bool fromModule, FileTuple file) 23 public FileFacade(bool fromModule, FileTuple file)
21 { 24 {
22 this.FromModule = fromModule; 25 this.FromModule = fromModule;
23 this.FileTuple = file; 26 this.FileTuple = file;
27
28 this.Identifier = file.Id;
29 this.ComponentRef = file.ComponentRef;
24 } 30 }
25 31
26 internal FileFacade(FileRow row) 32 public FileFacade(FileRow row)
27 { 33 {
28 this.FromTransform = true; 34 this.FromTransform = true;
29 this.FileRow = row; 35 this.FileRow = row;
36
37 this.Identifier = new Identifier(AccessModifier.Private, row.File);
38 this.ComponentRef = row.Component;
30 } 39 }
31 40
32 public bool FromModule { get; } 41 public bool FromModule { get; }
@@ -39,11 +48,11 @@ namespace WixToolset.Core.Bind
39 48
40 private AssemblyTuple AssemblyTuple { get; } 49 private AssemblyTuple AssemblyTuple { get; }
41 50
42 public string Id => this.FileRow == null ? this.FileTuple.Id.Id : this.FileRow.File; 51 public string Id => this.Identifier.Id;
43 52
44 public Identifier Identifier => this.FileRow == null ? this.FileTuple.Id : throw new NotImplementedException(); 53 public Identifier Identifier { get; }
45 54
46 public string ComponentRef => this.FileRow == null ? this.FileTuple.ComponentRef : this.FileRow.Component; 55 public string ComponentRef { get; }
47 56
48 public int DiskId 57 public int DiskId
49 { 58 {
@@ -137,7 +146,7 @@ namespace WixToolset.Core.Bind
137 } 146 }
138 } 147 }
139 148
140 public AssemblyType? AssemblyType => this.FileRow == null ? this.AssemblyTuple?.Type : throw new NotImplementedException(); 149 public AssemblyType? AssemblyType => this.FileRow == null ? this.AssemblyTuple?.Type : null;
141 150
142 public string AssemblyApplicationFileRef => this.FileRow == null ? this.AssemblyTuple?.ApplicationFileRef : throw new NotImplementedException(); 151 public string AssemblyApplicationFileRef => this.FileRow == null ? this.AssemblyTuple?.ApplicationFileRef : throw new NotImplementedException();
143 152
@@ -153,5 +162,10 @@ namespace WixToolset.Core.Bind
153 /// Gets or sets the MsiFileHash row for this file. 162 /// Gets or sets the MsiFileHash row for this file.
154 /// </summary> 163 /// </summary>
155 public MsiFileHashTuple Hash { get; set; } 164 public MsiFileHashTuple Hash { get; set; }
165
166 /// <summary>
167 /// Allows direct access to the underlying FileRow as requried for patching.
168 /// </summary>
169 public FileRow GetFileRow() => this.FileRow ?? throw new NotImplementedException();
156 } 170 }
157} 171}