diff options
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/WixInternal.TestSupport/Builder.cs | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/src/internal/WixInternal.TestSupport/Builder.cs b/src/internal/WixInternal.TestSupport/Builder.cs index 78804826..51b7bb0a 100644 --- a/src/internal/WixInternal.TestSupport/Builder.cs +++ b/src/internal/WixInternal.TestSupport/Builder.cs | |||
@@ -11,14 +11,29 @@ namespace WixInternal.TestSupport | |||
11 | public Builder(string sourceFolder, Type extensionType = null, string[] bindPaths = null, string outputFile = null) | 11 | public Builder(string sourceFolder, Type extensionType = null, string[] bindPaths = null, string outputFile = null) |
12 | { | 12 | { |
13 | this.SourceFolder = sourceFolder; | 13 | this.SourceFolder = sourceFolder; |
14 | this.ExtensionType = extensionType; | 14 | if (extensionType != null) |
15 | { | ||
16 | this.ExtensionTypes = new Type[] { extensionType }; | ||
17 | } | ||
18 | else | ||
19 | { | ||
20 | this.ExtensionTypes = new Type[] { }; | ||
21 | } | ||
22 | this.BindPaths = bindPaths; | ||
23 | this.OutputFile = outputFile ?? "test.msi"; | ||
24 | } | ||
25 | |||
26 | public Builder(string sourceFolder, Type[] extensionTypes, string[] bindPaths = null, string outputFile = null) | ||
27 | { | ||
28 | this.SourceFolder = sourceFolder; | ||
29 | this.ExtensionTypes = extensionTypes; | ||
15 | this.BindPaths = bindPaths; | 30 | this.BindPaths = bindPaths; |
16 | this.OutputFile = outputFile ?? "test.msi"; | 31 | this.OutputFile = outputFile ?? "test.msi"; |
17 | } | 32 | } |
18 | 33 | ||
19 | public string[] BindPaths { get; set; } | 34 | public string[] BindPaths { get; set; } |
20 | 35 | ||
21 | public Type ExtensionType { get; set; } | 36 | public Type[] ExtensionTypes { get; set; } |
22 | 37 | ||
23 | public string OutputFile { get; set; } | 38 | public string OutputFile { get; set; } |
24 | 39 | ||
@@ -46,10 +61,10 @@ namespace WixInternal.TestSupport | |||
46 | "-intermediateFolder", intermediateFolder, | 61 | "-intermediateFolder", intermediateFolder, |
47 | }; | 62 | }; |
48 | 63 | ||
49 | if (this.ExtensionType != null) | 64 | foreach (var ext in this.ExtensionTypes) |
50 | { | 65 | { |
51 | args.Add("-ext"); | 66 | args.Add("-ext"); |
52 | args.Add(Path.GetFullPath(new Uri(this.ExtensionType.Assembly.CodeBase).LocalPath)); | 67 | args.Add(Path.GetFullPath(new Uri(ext.Assembly.CodeBase).LocalPath)); |
53 | } | 68 | } |
54 | 69 | ||
55 | args.AddRange(sourceFiles); | 70 | args.AddRange(sourceFiles); |
@@ -108,10 +123,10 @@ namespace WixInternal.TestSupport | |||
108 | "-intermediateFolder", intermediateFolder, | 123 | "-intermediateFolder", intermediateFolder, |
109 | }; | 124 | }; |
110 | 125 | ||
111 | if (this.ExtensionType != null) | 126 | foreach (var ext in this.ExtensionTypes) |
112 | { | 127 | { |
113 | firstBuildArgs.Add("-ext"); | 128 | firstBuildArgs.Add("-ext"); |
114 | firstBuildArgs.Add(Path.GetFullPath(new Uri(this.ExtensionType.Assembly.CodeBase).LocalPath)); | 129 | firstBuildArgs.Add(Path.GetFullPath(new Uri(ext.Assembly.CodeBase).LocalPath)); |
115 | } | 130 | } |
116 | 131 | ||
117 | firstBuildArgs.AddRange(sourceFiles); | 132 | firstBuildArgs.AddRange(sourceFiles); |
@@ -140,10 +155,10 @@ namespace WixInternal.TestSupport | |||
140 | "-o", decompilePath | 155 | "-o", decompilePath |
141 | }; | 156 | }; |
142 | 157 | ||
143 | if (this.ExtensionType != null) | 158 | foreach (var ext in this.ExtensionTypes) |
144 | { | 159 | { |
145 | decompileArgs.Add("-ext"); | 160 | decompileArgs.Add("-ext"); |
146 | decompileArgs.Add(Path.GetFullPath(new Uri(this.ExtensionType.Assembly.CodeBase).LocalPath)); | 161 | decompileArgs.Add(Path.GetFullPath(new Uri(ext.Assembly.CodeBase).LocalPath)); |
147 | } | 162 | } |
148 | 163 | ||
149 | decompileFunc(decompileArgs.ToArray()); | 164 | decompileFunc(decompileArgs.ToArray()); |
@@ -157,10 +172,10 @@ namespace WixInternal.TestSupport | |||
157 | "-intermediateFolder", decompileIntermediateFolder | 172 | "-intermediateFolder", decompileIntermediateFolder |
158 | }; | 173 | }; |
159 | 174 | ||
160 | if (this.ExtensionType != null) | 175 | foreach (var ext in this.ExtensionTypes) |
161 | { | 176 | { |
162 | secondBuildArgs.Add("-ext"); | 177 | secondBuildArgs.Add("-ext"); |
163 | secondBuildArgs.Add(Path.GetFullPath(new Uri(this.ExtensionType.Assembly.CodeBase).LocalPath)); | 178 | secondBuildArgs.Add(Path.GetFullPath(new Uri(ext.Assembly.CodeBase).LocalPath)); |
164 | } | 179 | } |
165 | 180 | ||
166 | secondBuildArgs.Add("-bindpath"); | 181 | secondBuildArgs.Add("-bindpath"); |