| | 1 | | using System; |
| | 2 | | using System.Xml.Serialization; |
| | 3 | |
|
| | 4 | | namespace Mklinker { |
| | 5 | |
|
| | 6 | | public class ConfigLink { |
| | 7 | |
|
| | 8 | | [XmlElement("SourcePath")] |
| | 9 | | public string sourcePath; |
| | 10 | |
|
| | 11 | | [XmlElement("TargetPath")] |
| | 12 | | public string targetPath; |
| | 13 | |
|
| | 14 | | [XmlAttribute ("Type")] |
| | 15 | | public LinkType linkType; |
| | 16 | |
|
| | 17 | | public enum LinkType { |
| | 18 | | Default, |
| | 19 | | Junction, |
| | 20 | | Symbolic, |
| | 21 | | Hard |
| | 22 | | } |
| | 23 | |
|
| 0 | 24 | | public ConfigLink () {} |
| | 25 | |
|
| 396 | 26 | | public ConfigLink(string sourcePath, string targetPath, LinkType linkType) { |
| 198 | 27 | | this.sourcePath = sourcePath; |
| 198 | 28 | | this.targetPath = targetPath; |
| 198 | 29 | | this.linkType = linkType; |
| 198 | 30 | | } |
| | 31 | |
|
| 6 | 32 | | public override string ToString() { |
| 6 | 33 | | return $"{ linkType.ToString() } link:\n" + |
| 6 | 34 | | $"\t- Source: { sourcePath }\n" + |
| 6 | 35 | | $"\t- Target: { targetPath }"; |
| 6 | 36 | | } |
| | 37 | |
|
| | 38 | | } |
| | 39 | |
|
| | 40 | | } |