From 93692d4306b0f6ab3f97aab1598785951ec7bc47 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 1 Mar 2019 16:43:11 -0800 Subject: Include the include files with the processed document --- .../BasePreprocessorExtension.cs | 2 +- src/WixToolset.Extensibility/Data/IIncludedFile.cs | 21 +++++++++++++++++++++ .../Data/IPreprocessResult.cs | 14 ++++++++++++++ .../IPreprocessorExtension.cs | 2 +- 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 src/WixToolset.Extensibility/Data/IIncludedFile.cs create mode 100644 src/WixToolset.Extensibility/Data/IPreprocessResult.cs (limited to 'src') diff --git a/src/WixToolset.Extensibility/BasePreprocessorExtension.cs b/src/WixToolset.Extensibility/BasePreprocessorExtension.cs index b7d29095..cfacf97a 100644 --- a/src/WixToolset.Extensibility/BasePreprocessorExtension.cs +++ b/src/WixToolset.Extensibility/BasePreprocessorExtension.cs @@ -85,7 +85,7 @@ namespace WixToolset.Extensibility /// /// Called at the end of the preprocessing of a source file. /// - public virtual void PostPreprocess(XDocument document) + public virtual void PostPreprocess(IPreprocessResult result) { } } diff --git a/src/WixToolset.Extensibility/Data/IIncludedFile.cs b/src/WixToolset.Extensibility/Data/IIncludedFile.cs new file mode 100644 index 00000000..ac5e604c --- /dev/null +++ b/src/WixToolset.Extensibility/Data/IIncludedFile.cs @@ -0,0 +1,21 @@ +// 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.Data +{ + using WixToolset.Data; + + public interface IIncludedFile + { + /// + /// Gets the full path of the included file. + /// + /// The full path of the included file. + string Path { get; set; } + + /// + /// Gets the source line numbers. + /// + /// The source line numbers. + SourceLineNumber SourceLineNumbers { get; set; } + } +} diff --git a/src/WixToolset.Extensibility/Data/IPreprocessResult.cs b/src/WixToolset.Extensibility/Data/IPreprocessResult.cs new file mode 100644 index 00000000..955c0ced --- /dev/null +++ b/src/WixToolset.Extensibility/Data/IPreprocessResult.cs @@ -0,0 +1,14 @@ +// 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.Data +{ + using System.Collections.Generic; + using System.Xml.Linq; + + public interface IPreprocessResult + { + XDocument Document { get; set; } + + IEnumerable IncludedFiles { get; set; } + } +} diff --git a/src/WixToolset.Extensibility/IPreprocessorExtension.cs b/src/WixToolset.Extensibility/IPreprocessorExtension.cs index 7eb8584f..94eb7d78 100644 --- a/src/WixToolset.Extensibility/IPreprocessorExtension.cs +++ b/src/WixToolset.Extensibility/IPreprocessorExtension.cs @@ -53,6 +53,6 @@ namespace WixToolset.Extensibility /// /// Called at the end of the preprocessing of a source file. /// - void PostPreprocess(XDocument document); + void PostPreprocess(IPreprocessResult result); } } -- cgit v1.2.3-55-g6feb