diff options
Diffstat (limited to 'src/WixToolset.Extensibility/Data/BindPath.cs')
| -rw-r--r-- | src/WixToolset.Extensibility/Data/BindPath.cs | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/WixToolset.Extensibility/Data/BindPath.cs b/src/WixToolset.Extensibility/Data/BindPath.cs deleted file mode 100644 index 3b0b73bb..00000000 --- a/src/WixToolset.Extensibility/Data/BindPath.cs +++ /dev/null | |||
| @@ -1,59 +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 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 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, BindStage.Normal) | ||
| 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 | /// <param name="stage">Stage for the bind path.</param> | ||
| 26 | public BindPath(string name, string path, BindStage stage = BindStage.Normal) | ||
| 27 | { | ||
| 28 | this.Name = name; | ||
| 29 | this.Path = path; | ||
| 30 | this.Stage = stage; | ||
| 31 | } | ||
| 32 | |||
| 33 | /// <summary> | ||
| 34 | /// Name of the bind path or String.Empty if the path is unnamed. | ||
| 35 | /// </summary> | ||
| 36 | public string Name { get; set; } | ||
| 37 | |||
| 38 | /// <summary> | ||
| 39 | /// Path for the bind path. | ||
| 40 | /// </summary> | ||
| 41 | public string Path { get; set; } | ||
| 42 | |||
| 43 | /// <summary> | ||
| 44 | /// Stage for the bind path. | ||
| 45 | /// </summary> | ||
| 46 | public BindStage Stage { get; set; } | ||
| 47 | |||
| 48 | /// <summary> | ||
| 49 | /// Parses a normal bind path from its string representation | ||
| 50 | /// </summary> | ||
| 51 | /// <param name="bindPath">String representation of bind path that looks like: [name=]path</param> | ||
| 52 | /// <returns>Parsed normal bind path.</returns> | ||
| 53 | public static BindPath Parse(string bindPath) | ||
| 54 | { | ||
| 55 | string[] namedPath = bindPath.Split(new char[] { '=' }, 2); | ||
| 56 | return (1 == namedPath.Length) ? new BindPath(namedPath[0]) : new BindPath(namedPath[0], namedPath[1]); | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
