summaryrefslogtreecommitdiff
path: root/src/tools/heat/Extensibility/BaseHeatExtension.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/heat/Extensibility/BaseHeatExtension.cs')
-rw-r--r--src/tools/heat/Extensibility/BaseHeatExtension.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/tools/heat/Extensibility/BaseHeatExtension.cs b/src/tools/heat/Extensibility/BaseHeatExtension.cs
new file mode 100644
index 00000000..b76aaf62
--- /dev/null
+++ b/src/tools/heat/Extensibility/BaseHeatExtension.cs
@@ -0,0 +1,55 @@
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
3namespace WixToolset.Harvesters.Extensibility
4{
5 using System;
6 using WixToolset.Harvesters.Data;
7
8 /// <summary>
9 /// An extension for the WiX Toolset Harvester application.
10 /// </summary>
11 public abstract class BaseHeatExtension : IHeatExtension
12 {
13 /// <summary>
14 /// Gets or sets the heat core for the extension.
15 /// </summary>
16 /// <value>The heat core for the extension.</value>
17 public IHeatCore Core { get; set; }
18
19 /// <summary>
20 /// Gets the supported command line types for this extension.
21 /// </summary>
22 /// <value>The supported command line types for this extension.</value>
23 public virtual HeatCommandLineOption[] CommandLineTypes
24 {
25 get { return null; }
26 }
27
28 /// <summary>
29 /// Parse the command line options for this extension.
30 /// </summary>
31 /// <param name="type">The active harvester type.</param>
32 /// <param name="args">The option arguments.</param>
33 public virtual void ParseOptions(string type, string[] args)
34 {
35 }
36
37 /// <summary>
38 /// Determines if the index refers to an argument.
39 /// </summary>
40 /// <param name="args"></param>
41 /// <param name="index"></param>
42 /// <returns></returns>
43 public static bool IsValidArg(string[] args, int index)
44 {
45 if (args.Length <= index || String.IsNullOrEmpty(args[index]) || '/' == args[index][0] || '-' == args[index][0])
46 {
47 return false;
48 }
49 else
50 {
51 return true;
52 }
53 }
54 }
55}