From c08fd0aefeea1628fe93c818ca4dde63fd6ac2e1 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 17 Oct 2017 02:47:44 -0700 Subject: 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. --- .../CommandLine/CommandLineContext.cs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/WixToolset.Core/CommandLine/CommandLineContext.cs (limited to 'src/WixToolset.Core/CommandLine/CommandLineContext.cs') 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 @@ +// 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. + +namespace WixToolset.Core +{ + using System; + using WixToolset.Data; + using WixToolset.Extensibility.Services; + + internal class CommandLineContext : ICommandLineContext + { + public CommandLineContext(IServiceProvider serviceProvider) + { + this.ServiceProvider = serviceProvider; + } + + public IServiceProvider ServiceProvider { get; } + + public Messaging Messaging { get; set; } + + public IExtensionManager ExtensionManager { get; set; } + + public string Arguments { get; set; } + + public string[] ParsedArguments { get; set; } + } +} -- cgit v1.2.3-55-g6feb