aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-04-02 20:45:40 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-04-02 21:34:24 +1000
commit177784c9a6d93eeb3c195e6d62b97eb4c1dde32b (patch)
tree1ad322fa26816a32279f5433ec500cbdf5934f86 /src/WixToolset.Core.WindowsInstaller
parent302b501f9ed2ae840ce598b30792d0fc1b538572 (diff)
downloadwix-177784c9a6d93eeb3c195e6d62b97eb4c1dde32b.tar.gz
wix-177784c9a6d93eeb3c195e6d62b97eb4c1dde32b.tar.bz2
wix-177784c9a6d93eeb3c195e6d62b97eb4c1dde32b.zip
Use IWixToolsetServiceProvider and IWixToolsetCoreServiceProvider to expose the more convenient methods from WixToolsetServiceProvider without requiring casting or extension methods.
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs2
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs4
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs4
-rw-r--r--src/WixToolset.Core.WindowsInstaller/UnbindContext.cs10
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Unbinder.cs8
5 files changed, 18 insertions, 10 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
index 6878aed5..2ced48ea 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
@@ -54,7 +54,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
54 this.BackendExtensions = backendExtension; 54 this.BackendExtensions = backendExtension;
55 } 55 }
56 56
57 public IServiceProvider ServiceProvider { get; } 57 public IWixToolsetServiceProvider ServiceProvider { get; }
58 58
59 private IMessaging Messaging { get; } 59 private IMessaging Messaging { get; }
60 60
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs
index 79b1c619..189c5f01 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs
@@ -15,7 +15,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
15 15
16 public class CabinetResolver 16 public class CabinetResolver
17 { 17 {
18 public CabinetResolver(IServiceProvider serviceProvider, string cabCachePath, IEnumerable<IWindowsInstallerBackendBinderExtension> backendExtensions) 18 public CabinetResolver(IWixToolsetServiceProvider serviceProvider, string cabCachePath, IEnumerable<IWindowsInstallerBackendBinderExtension> backendExtensions)
19 { 19 {
20 this.ServiceProvider = serviceProvider; 20 this.ServiceProvider = serviceProvider;
21 21
@@ -24,7 +24,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
24 this.BackendExtensions = backendExtensions; 24 this.BackendExtensions = backendExtensions;
25 } 25 }
26 26
27 private IServiceProvider ServiceProvider { get; } 27 private IWixToolsetServiceProvider ServiceProvider { get; }
28 28
29 private string CabCachePath { get; } 29 private string CabCachePath { get; }
30 30
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs
index 50dc7e3f..2536eeac 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs
@@ -33,7 +33,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
33 33
34 private Dictionary<string, string> lastCabinetAddedToMediaTable; // Key is First Cabinet Name, Value is Last Cabinet Added in the Split Sequence 34 private Dictionary<string, string> lastCabinetAddedToMediaTable; // Key is First Cabinet Name, Value is Last Cabinet Added in the Split Sequence
35 35
36 public CreateCabinetsCommand(IServiceProvider serviceProvider, IBackendHelper backendHelper) 36 public CreateCabinetsCommand(IWixToolsetServiceProvider serviceProvider, IBackendHelper backendHelper)
37 { 37 {
38 this.fileTransfers = new List<IFileTransfer>(); 38 this.fileTransfers = new List<IFileTransfer>();
39 39
@@ -46,7 +46,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
46 this.BackendHelper = backendHelper; 46 this.BackendHelper = backendHelper;
47 } 47 }
48 48
49 public IServiceProvider ServiceProvider { get; } 49 public IWixToolsetServiceProvider ServiceProvider { get; }
50 50
51 public IBackendHelper BackendHelper { get; } 51 public IBackendHelper BackendHelper { get; }
52 52
diff --git a/src/WixToolset.Core.WindowsInstaller/UnbindContext.cs b/src/WixToolset.Core.WindowsInstaller/UnbindContext.cs
index 2bc4516d..f60a0e1a 100644
--- a/src/WixToolset.Core.WindowsInstaller/UnbindContext.cs
+++ b/src/WixToolset.Core.WindowsInstaller/UnbindContext.cs
@@ -1,13 +1,19 @@
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
3namespace WixToolset.Core 3namespace WixToolset.Core
4{ 4{
5 using System; 5 using System;
6 using WixToolset.Extensibility.Data; 6 using WixToolset.Extensibility.Data;
7 using WixToolset.Extensibility.Services;
7 8
8 internal class UnbindContext : IUnbindContext 9 internal class UnbindContext : IUnbindContext
9 { 10 {
10 public IServiceProvider ServiceProvider { get; } 11 internal UnbindContext(IWixToolsetServiceProvider serviceProvider)
12 {
13 this.ServiceProvider = serviceProvider;
14 }
15
16 public IWixToolsetServiceProvider ServiceProvider { get; }
11 17
12 public string ExportBasePath { get; set; } 18 public string ExportBasePath { get; set; }
13 19
diff --git a/src/WixToolset.Core.WindowsInstaller/Unbinder.cs b/src/WixToolset.Core.WindowsInstaller/Unbinder.cs
index e8c109d2..2ca0b557 100644
--- a/src/WixToolset.Core.WindowsInstaller/Unbinder.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Unbinder.cs
@@ -2,11 +2,11 @@
2 2
3namespace WixToolset.Core 3namespace WixToolset.Core
4{ 4{
5 using System.Collections; 5 using System.Collections.Generic;
6 using System.IO; 6 using System.IO;
7 using WixToolset.Data; 7 using WixToolset.Data;
8 using WixToolset.Extensibility; 8 using WixToolset.Extensibility;
9 using System.Collections.Generic; 9 using WixToolset.Extensibility.Services;
10 10
11 /// <summary> 11 /// <summary>
12 /// Unbinder core of the WiX toolset. 12 /// Unbinder core of the WiX toolset.
@@ -21,6 +21,8 @@ namespace WixToolset.Core
21 /// <value>Set to true if the input msi is part of an admin image.</value> 21 /// <value>Set to true if the input msi is part of an admin image.</value>
22 public bool IsAdminImage { get; set; } 22 public bool IsAdminImage { get; set; }
23 23
24 public IWixToolsetServiceProvider ServiceProvider { get; }
25
24 /// <summary> 26 /// <summary>
25 /// Gets or sets the option to suppress demodularizing values. 27 /// Gets or sets the option to suppress demodularizing values.
26 /// </summary> 28 /// </summary>
@@ -64,7 +66,7 @@ namespace WixToolset.Core
64 // if we don't have the temporary files object yet, get one 66 // if we don't have the temporary files object yet, get one
65 Directory.CreateDirectory(this.TempFilesLocation); // ensure the base path is there 67 Directory.CreateDirectory(this.TempFilesLocation); // ensure the base path is there
66 68
67 var context = new UnbindContext(); 69 var context = new UnbindContext(this.ServiceProvider);
68 context.InputFilePath = file; 70 context.InputFilePath = file;
69 context.ExportBasePath = exportBasePath; 71 context.ExportBasePath = exportBasePath;
70 context.IntermediateFolder = this.TempFilesLocation; 72 context.IntermediateFolder = this.TempFilesLocation;