aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs')
-rw-r--r--src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs b/src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs
index 7de40fb8..7e7c21b1 100644
--- a/src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs
+++ b/src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs
@@ -11,7 +11,12 @@ namespace WixToolset.Core.Bind
11 11
12 public class ExtractEmbeddedFilesCommand 12 public class ExtractEmbeddedFilesCommand
13 { 13 {
14 public IEnumerable<IExpectedExtractFile> FilesWithEmbeddedFiles { private get; set; } 14 public ExtractEmbeddedFilesCommand(IEnumerable<IExpectedExtractFile> embeddedFiles)
15 {
16 this.FilesWithEmbeddedFiles = embeddedFiles;
17 }
18
19 private IEnumerable<IExpectedExtractFile> FilesWithEmbeddedFiles { get; }
15 20
16 public void Execute() 21 public void Execute()
17 { 22 {
@@ -28,10 +33,10 @@ namespace WixToolset.Core.Bind
28 // a .wixlib embedded in a WixExtension). 33 // a .wixlib embedded in a WixExtension).
29 if ("embeddedresource" == baseUri.Scheme) 34 if ("embeddedresource" == baseUri.Scheme)
30 { 35 {
31 string assemblyPath = Path.GetFullPath(baseUri.LocalPath); 36 var assemblyPath = Path.GetFullPath(baseUri.LocalPath);
32 string resourceName = baseUri.Fragment.TrimStart('#'); 37 var resourceName = baseUri.Fragment.TrimStart('#');
33 38
34 Assembly assembly = Assembly.LoadFile(assemblyPath); 39 var assembly = Assembly.LoadFile(assemblyPath);
35 stream = assembly.GetManifestResourceStream(resourceName); 40 stream = assembly.GetManifestResourceStream(resourceName);
36 } 41 }
37 else // normal file (usually a binary .wixlib on disk). 42 else // normal file (usually a binary .wixlib on disk).
@@ -39,7 +44,7 @@ namespace WixToolset.Core.Bind
39 stream = File.OpenRead(baseUri.LocalPath); 44 stream = File.OpenRead(baseUri.LocalPath);
40 } 45 }
41 46
42 using (FileStructure fs = FileStructure.Read(stream)) 47 using (var fs = FileStructure.Read(stream))
43 { 48 {
44 var uniqueIndicies = new SortedSet<int>(); 49 var uniqueIndicies = new SortedSet<int>();
45 50