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