blob: 8e2b3ce2f29489d4926b8146c2cee972e6665cc3 (
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
31
|
// 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;
using WixToolset.Extensibility.Services;
internal class BurnBackendFactory : 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;
}
}
}
|