| 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.Burn |
| 4 | { |
| 5 | using System; |
| 6 | using System.IO; |
| 7 | using WixToolset.Extensibility; |
| 8 | |
| 9 | internal class BurnBackendFactory : IBackendFactory |
| 10 | { |
| 11 | public bool TryCreateBackend(string outputType, string outputFile, out IBackend backend) |
| 12 | { |
| 13 | if (String.IsNullOrEmpty(outputType)) |
| 14 | { |
| 15 | outputType = Path.GetExtension(outputFile); |
| 16 | } |
| 17 | |
| 18 | switch (outputType.ToLowerInvariant()) |
| 19 | { |
| 20 | case "bundle": |
| 21 | case "burn": |
| 22 | case ".exe": |
| 23 | backend = new BundleBackend(); |
| 24 | return true; |
| 25 | } |
| 26 | |
| 27 | backend = null; |
| 28 | return false; |
| 29 | } |
| 30 | } |
| 31 | } |