diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-10-17 02:47:44 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-10-18 13:31:55 -0700 |
| commit | c08fd0aefeea1628fe93c818ca4dde63fd6ac2e1 (patch) | |
| tree | ac63402f6bad7f3a5bc20b088914145d9bf8635b /src/WixToolset.Core/CommandLine/CommandLineContext.cs | |
| parent | 6dd045318f7ee405e92e76d311ad1424c20157c1 (diff) | |
| download | wix-c08fd0aefeea1628fe93c818ca4dde63fd6ac2e1.tar.gz wix-c08fd0aefeea1628fe93c818ca4dde63fd6ac2e1.tar.bz2 wix-c08fd0aefeea1628fe93c818ca4dde63fd6ac2e1.zip | |
Introduce WixToolsetServiceProvider
Using a service provider allows all of WixToolset.Core's internal
functionality to be abstracted behind interfaces in WixToolset.Extensibility.
The service provide can also control what interfaces are singletons.
Diffstat (limited to 'src/WixToolset.Core/CommandLine/CommandLineContext.cs')
| -rw-r--r-- | src/WixToolset.Core/CommandLine/CommandLineContext.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/WixToolset.Core/CommandLine/CommandLineContext.cs b/src/WixToolset.Core/CommandLine/CommandLineContext.cs new file mode 100644 index 00000000..96c149be --- /dev/null +++ b/src/WixToolset.Core/CommandLine/CommandLineContext.cs | |||
| @@ -0,0 +1,26 @@ | |||
| 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 | |||
| 3 | namespace WixToolset.Core | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using WixToolset.Data; | ||
| 7 | using WixToolset.Extensibility.Services; | ||
| 8 | |||
| 9 | internal class CommandLineContext : ICommandLineContext | ||
| 10 | { | ||
| 11 | public CommandLineContext(IServiceProvider serviceProvider) | ||
| 12 | { | ||
| 13 | this.ServiceProvider = serviceProvider; | ||
| 14 | } | ||
| 15 | |||
| 16 | public IServiceProvider ServiceProvider { get; } | ||
| 17 | |||
| 18 | public Messaging Messaging { get; set; } | ||
| 19 | |||
| 20 | public IExtensionManager ExtensionManager { get; set; } | ||
| 21 | |||
| 22 | public string Arguments { get; set; } | ||
| 23 | |||
| 24 | public string[] ParsedArguments { get; set; } | ||
| 25 | } | ||
| 26 | } | ||
