aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Extensibility/BindPath.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Extensibility/BindPath.cs')
-rw-r--r--src/WixToolset.Extensibility/BindPath.cs52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/WixToolset.Extensibility/BindPath.cs b/src/WixToolset.Extensibility/BindPath.cs
deleted file mode 100644
index 236ee4ec..00000000
--- a/src/WixToolset.Extensibility/BindPath.cs
+++ /dev/null
@@ -1,52 +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.Extensibility
4{
5 using System;
6
7 /// <summary>
8 /// Bind path representation.
9 /// </summary>
10 public class BindPath
11 {
12 /// <summary>
13 /// Creates an unnamed bind path.
14 /// </summary>
15 /// <param name="path">Path for the bind path.</param>
16 public BindPath(string path) : this(String.Empty, path)
17 {
18 }
19
20 /// <summary>
21 /// Creates a named bind path.
22 /// </summary>
23 /// <param name="name">Name of the bind path.</param>
24 /// <param name="path">Path for the bind path.</param>
25 public BindPath(string name, string path)
26 {
27 this.Name = name;
28 this.Path = path;
29 }
30
31 /// <summary>
32 /// Parses a bind path from its string representation
33 /// </summary>
34 /// <param name="bindPath">String representation of bind path that looks like: [name=]path</param>
35 /// <returns>Parsed bind path.</returns>
36 public static BindPath Parse(string bindPath)
37 {
38 string[] namedPath = bindPath.Split(new char[] { '=' }, 2);
39 return (1 == namedPath.Length) ? new BindPath(namedPath[0]) : new BindPath(namedPath[0], namedPath[1]);
40 }
41
42 /// <summary>
43 /// Name of the bind path or String.Empty if the path is unnamed.
44 /// </summary>
45 public string Name { get; set; }
46
47 /// <summary>
48 /// Path for the bind path.
49 /// </summary>
50 public string Path { get; set; }
51 }
52}