aboutsummaryrefslogtreecommitdiff
path: root/src/wix/WixToolset.Core.Burn/Bind/BaseSearchFacade.cs
blob: 0da78797746bfe9c31e149ae644d5c38ddc0ca3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 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.Burn
{
    using System;
    using System.Xml;
    using WixToolset.Data.Symbols;

    internal abstract class BaseSearchFacade : ISearchFacade
    {
        protected WixSearchSymbol SearchSymbol { get; set; }

        public virtual void WriteXml(XmlTextWriter writer)
        {
            writer.WriteAttributeString("Id", this.SearchSymbol.Id.Id);
            writer.WriteAttributeString("Variable", this.SearchSymbol.Variable);
            if (!String.IsNullOrEmpty(this.SearchSymbol.Condition))
            {
                writer.WriteAttributeString("Condition", this.SearchSymbol.Condition);
            }
            if (!String.IsNullOrEmpty(this.SearchSymbol.BundleExtensionRef))
            {
                writer.WriteAttributeString("ExtensionId", this.SearchSymbol.BundleExtensionRef);
            }
        }
    }
}