From 155a6e96346e0cb3d9ab6f5372fa29b46ebaee89 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 19 Dec 2017 12:25:40 -0800 Subject: Integrate simplified message handling --- .../Preprocess/ProcessedStreamEventHandler.cs | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs (limited to 'src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs') diff --git a/src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs b/src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs new file mode 100644 index 00000000..434590d2 --- /dev/null +++ b/src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs @@ -0,0 +1,43 @@ +// 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.Preprocess +{ + using System; + using System.Xml.Linq; + + /// + /// Preprocessed output stream event handler delegate. + /// + /// Sender of the message. + /// Arguments for the preprocessed stream event. + public delegate void ProcessedStreamEventHandler(object sender, ProcessedStreamEventArgs e); + + /// + /// Event args for preprocessed stream event. + /// + public class ProcessedStreamEventArgs : EventArgs + { + /// + /// Creates a new ProcessedStreamEventArgs. + /// + /// Source file that is preprocessed. + /// Preprocessed output document. + public ProcessedStreamEventArgs(string sourceFile, XDocument document) + { + this.SourceFile = sourceFile; + this.Document = document; + } + + /// + /// Gets the full path of the source file. + /// + /// The full path of the source file. + public string SourceFile { get; private set; } + + /// + /// Gets the preprocessed output stream. + /// + /// The the preprocessed output stream. + public XDocument Document { get; private set; } + } +} -- cgit v1.2.3-55-g6feb