diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-26 15:12:34 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-26 15:12:34 -0800 |
| commit | ed5fd9d8258a5c752cd37fe7702f3a0dc37052f7 (patch) | |
| tree | 56e50298b456f1ca1cf9af71b10c8a1d4bf157a3 /src/WixToolset.Extensibility/ServiceProviderExtensions.cs | |
| parent | 027d1ac927aa6b0ee0c934b1f6b540d2a1667df2 (diff) | |
| download | wix-ed5fd9d8258a5c752cd37fe7702f3a0dc37052f7.tar.gz wix-ed5fd9d8258a5c752cd37fe7702f3a0dc37052f7.tar.bz2 wix-ed5fd9d8258a5c752cd37fe7702f3a0dc37052f7.zip | |
Move copy/move file operations to ILayoutExtension plus other cleanup
Diffstat (limited to 'src/WixToolset.Extensibility/ServiceProviderExtensions.cs')
| -rw-r--r-- | src/WixToolset.Extensibility/ServiceProviderExtensions.cs | 14 |
1 files changed, 14 insertions, 0 deletions
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 @@ | |||
| 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.Extensibility | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | |||
| 7 | public static class ServiceProviderExtensions | ||
| 8 | { | ||
| 9 | public static T GetService<T>(this IServiceProvider serviceProvider) where T : class | ||
| 10 | { | ||
| 11 | return (T)serviceProvider.GetService(typeof(T)); | ||
| 12 | } | ||
| 13 | } | ||
| 14 | } | ||
