From 84d1f05fee656c01938613bcc50bd8139006bbf6 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 31 Dec 2017 00:43:02 -0800 Subject: Support preprocessing .wxl files --- src/WixToolset.Core/Localizer.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/WixToolset.Core/Localizer.cs') diff --git a/src/WixToolset.Core/Localizer.cs b/src/WixToolset.Core/Localizer.cs index 38d8864e..cb9a4406 100644 --- a/src/WixToolset.Core/Localizer.cs +++ b/src/WixToolset.Core/Localizer.cs @@ -22,13 +22,22 @@ namespace WixToolset.Core /// /// Loads a localization file from a path on disk. /// - /// Path to library file saved on disk. - /// Collection containing TableDefinitions to use when loading the localization file. - /// Suppress xml schema validation while loading. + /// Path to localization file saved on disk. /// Returns the loaded localization file. public static Localization ParseLocalizationFile(IMessaging messaging, string path) { - XElement root = XDocument.Load(path).Root; + var document = XDocument.Load(path); + return ParseLocalizationFile(messaging, document); + } + + /// + /// Loads a localization file from memory. + /// + /// Document to parse as localization file. + /// Returns the loaded localization file. + public static Localization ParseLocalizationFile(IMessaging messaging, XDocument document) + { + XElement root = document.Root; Localization localization = null; SourceLineNumber sourceLineNumbers = SourceLineNumber.CreateFromXObject(root); -- cgit v1.2.3-55-g6feb