// 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.Extensibility
{
using System.Collections.Generic;
using System.Xml.Linq;
using WixToolset.Data;
using WixToolset.Extensibility.Data;
///
/// Interface all compiler extensions implement.
///
public interface ICompilerExtension
{
///
/// Gets the schema namespace for this extension.
///
/// Schema namespace supported by this extension.
XNamespace Namespace { get; }
///
/// Called at the beginning of the compilation of a source file.
///
void PreCompile(ICompileContext context);
///
/// Processes an attribute for the Compiler.
///
/// Parent element of attribute.
/// Attribute to process.
/// Extra information about the context in which this element is being parsed.
void ParseAttribute(Intermediate intermediate, IntermediateSection section, XElement parentElement, XAttribute attribute, IDictionary context);
///
/// Processes an element for the Compiler.
///
/// Parent element of element to process.
/// Element to process.
/// Extra information about the context in which this element is being parsed.
void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary context);
///
/// Processes an element for the Compiler, with the ability to supply a component keypath.
///
/// Parent element of element to process.
/// Element to process.
/// Extra information about the context in which this element is being parsed.
IComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary context);
///
/// Called at the end of the compilation of a source file.
///
void PostCompile(Intermediate intermediate);
}
}