main
cs 25 lines 938 Bytes
Raw
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.Converters
4 {
5 using WixToolset.Extensibility.Services;
6
7 /// <summary>
8 /// Extension methods for adding Converters services.
9 /// </summary>
10 public static class WixToolsetCoreServiceProviderExtensions
11 {
12 /// <summary>
13 /// Adds Converters services.
14 /// </summary>
15 /// <param name="coreProvider"></param>
16 /// <returns></returns>
17 public static IWixToolsetCoreServiceProvider AddConverter(this IWixToolsetCoreServiceProvider coreProvider)
18 {
19 var extensionManager = coreProvider.GetService<IExtensionManager>();
20 extensionManager.Add(typeof(ConverterExtensionFactory).Assembly);
21
22 return coreProvider;
23 }
24 }
25 }