main
cs 61 lines 3.01 KB
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.Extensibility
4 {
5 using System.Collections.Generic;
6 using System.Xml.Linq;
7 using WixToolset.Data;
8 using WixToolset.Extensibility.Data;
9
10 /// <summary>
11 /// Interface all compiler extensions implement.
12 /// </summary>
13 public interface ICompilerExtension
14 {
15 /// <summary>
16 /// Gets the schema namespace for this extension.
17 /// </summary>
18 /// <value>Schema namespace supported by this extension.</value>
19 XNamespace Namespace { get; }
20
21 /// <summary>
22 /// Called at the beginning of the compilation of a source file.
23 /// </summary>
24 void PreCompile(ICompileContext context);
25
26 /// <summary>
27 /// Processes an attribute for the Compiler.
28 /// </summary>
29 /// <param name="intermediate">Parent intermediate.</param>
30 /// <param name="section">Parent section.</param>
31 /// <param name="parentElement">Parent element of attribute.</param>
32 /// <param name="attribute">Attribute to process.</param>
33 /// <param name="context">Extra information about the context in which this element is being parsed.</param>
34 void ParseAttribute(Intermediate intermediate, IntermediateSection section, XElement parentElement, XAttribute attribute, IDictionary<string, string> context);
35
36 /// <summary>
37 /// Processes an element for the Compiler.
38 /// </summary>
39 /// <param name="intermediate">Parent intermediate.</param>
40 /// <param name="section">Parent section.</param>
41 /// <param name="parentElement">Parent element of element to process.</param>
42 /// <param name="element">Element to process.</param>
43 /// <param name="context">Extra information about the context in which this element is being parsed.</param>
44 void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context);
45
46 /// <summary>
47 /// Processes an element for the Compiler, with the ability to supply a component keypath.
48 /// </summary>
49 /// <param name="intermediate">Parent intermediate.</param>
50 /// <param name="section">Parent section.</param>
51 /// <param name="parentElement">Parent element of element to process.</param>
52 /// <param name="element">Element to process.</param>
53 /// <param name="context">Extra information about the context in which this element is being parsed.</param>
54 IComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context);
55
56 /// <summary>
57 /// Called at the end of the compilation of a source file.
58 /// </summary>
59 void PostCompile(Intermediate intermediate);
60 }
61 }