| 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.Core.Burn |
| 4 | { |
| 5 | using System; |
| 6 | using System.Xml; |
| 7 | using WixToolset.Data.Symbols; |
| 8 | |
| 9 | internal abstract class BaseSearchFacade : ISearchFacade |
| 10 | { |
| 11 | protected WixSearchSymbol SearchSymbol { get; set; } |
| 12 | |
| 13 | public virtual void WriteXml(XmlTextWriter writer) |
| 14 | { |
| 15 | writer.WriteAttributeString("Id", this.SearchSymbol.Id.Id); |
| 16 | writer.WriteAttributeString("Variable", this.SearchSymbol.Variable); |
| 17 | if (!String.IsNullOrEmpty(this.SearchSymbol.Condition)) |
| 18 | { |
| 19 | writer.WriteAttributeString("Condition", this.SearchSymbol.Condition); |
| 20 | } |
| 21 | if (!String.IsNullOrEmpty(this.SearchSymbol.BootstrapperExtensionRef)) |
| 22 | { |
| 23 | writer.WriteAttributeString("ExtensionId", this.SearchSymbol.BootstrapperExtensionRef); |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | } |