diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-11-11 01:45:59 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-11-11 01:45:59 -0800 |
| commit | 9f8cb5374481b6c8a06eb2739858332350f72666 (patch) | |
| tree | 4b09b90d8a516cb5e7d8203759bd2489b6a5d20c /src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs | |
| parent | 2bb37beda887d120a0ddabf874ad25357101faa1 (diff) | |
| download | wix-9f8cb5374481b6c8a06eb2739858332350f72666.tar.gz wix-9f8cb5374481b6c8a06eb2739858332350f72666.tar.bz2 wix-9f8cb5374481b6c8a06eb2739858332350f72666.zip | |
Additional IR updates
Diffstat (limited to 'src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs')
| -rw-r--r-- | src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs | 15 |
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 | ||
