aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.Burn/Bind/WixFileSearchInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core.Burn/Bind/WixFileSearchInfo.cs')
-rw-r--r--src/WixToolset.Core.Burn/Bind/WixFileSearchInfo.cs56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/WixToolset.Core.Burn/Bind/WixFileSearchInfo.cs b/src/WixToolset.Core.Burn/Bind/WixFileSearchInfo.cs
deleted file mode 100644
index 41393f6b..00000000
--- a/src/WixToolset.Core.Burn/Bind/WixFileSearchInfo.cs
+++ /dev/null
@@ -1,56 +0,0 @@
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
3namespace WixToolset.Core.Burn
4{
5 using System;
6 using System.Xml;
7 using WixToolset.Data;
8
9 /// <summary>
10 /// Utility class for all WixFileSearches (file and directory searches).
11 /// </summary>
12 internal class WixFileSearchInfo : WixSearchInfo
13 {
14#if TODO
15 public WixFileSearchInfo(Row row)
16 : this((string)row[0], (string)row[1], (int)row[9])
17 {
18 }
19#endif
20
21 public WixFileSearchInfo(string id, string path, int attributes)
22 : base(id)
23 {
24 this.Path = path;
25 this.Attributes = (WixFileSearchAttributes)attributes;
26 }
27
28 public string Path { get; private set; }
29 public WixFileSearchAttributes Attributes { get; private set; }
30
31 /// <summary>
32 /// Generates Burn manifest and ParameterInfo-style markup for a file/directory search.
33 /// </summary>
34 /// <param name="writer"></param>
35 public override void WriteXml(XmlTextWriter writer)
36 {
37 writer.WriteStartElement((0 == (this.Attributes & WixFileSearchAttributes.IsDirectory)) ? "FileSearch" : "DirectorySearch");
38 this.WriteWixSearchAttributes(writer);
39 writer.WriteAttributeString("Path", this.Path);
40 if (WixFileSearchAttributes.WantExists == (this.Attributes & WixFileSearchAttributes.WantExists))
41 {
42 writer.WriteAttributeString("Type", "exists");
43 }
44 else if (WixFileSearchAttributes.WantVersion == (this.Attributes & WixFileSearchAttributes.WantVersion))
45 {
46 // Can never get here for DirectorySearch.
47 writer.WriteAttributeString("Type", "version");
48 }
49 else
50 {
51 writer.WriteAttributeString("Type", "path");
52 }
53 writer.WriteEndElement();
54 }
55 }
56}