From ed5fd9d8258a5c752cd37fe7702f3a0dc37052f7 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 26 Dec 2017 15:12:34 -0800 Subject: Move copy/move file operations to ILayoutExtension plus other cleanup --- src/WixToolset.Extensibility/ServiceProviderExtensions.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/WixToolset.Extensibility/ServiceProviderExtensions.cs (limited to 'src/WixToolset.Extensibility/ServiceProviderExtensions.cs') diff --git a/src/WixToolset.Extensibility/ServiceProviderExtensions.cs b/src/WixToolset.Extensibility/ServiceProviderExtensions.cs new file mode 100644 index 00000000..408d1523 --- /dev/null +++ b/src/WixToolset.Extensibility/ServiceProviderExtensions.cs @@ -0,0 +1,14 @@ +// 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.Extensibility +{ + using System; + + public static class ServiceProviderExtensions + { + public static T GetService(this IServiceProvider serviceProvider) where T : class + { + return (T)serviceProvider.GetService(typeof(T)); + } + } +} -- cgit v1.2.3-55-g6feb