chr
2026-04-05 fe750b791d5b517cc4e9bc8e99a9a75139a0cfba
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
namespace OpenTap.Package
{
    /// <summary>
    /// Interface for determining where a package definition is sourced.
    /// </summary>
    public interface IPackageDefSource
    {
    }
 
    /// <summary>
    /// The package definition is sourced from a .TapPackage file.
    /// </summary>
    public interface IFilePackageDefSource : IPackageDefSource
    {
        /// <summary>
        /// The file path of the .TapPackage the package definition is loaded from.
        /// </summary>
        string PackageFilePath { get; set; }
    }
 
    /// <summary>
    /// The package definition is sourced from a .TapPackage file.
    /// </summary>
    public class FilePackageDefSource : IFilePackageDefSource
    {
        /// <summary>
        /// The file path of the .TapPackage the package definition is loaded from.
        /// </summary>
        public string PackageFilePath { get; set; }
    }
 
    /// <summary>
    /// The package definition is sourced from a package repository.
    /// </summary>
    public interface IRepositoryPackageDefSource : IPackageDefSource
    {
        /// <summary>
        /// The repository the package is sourced.
        /// </summary>
        string RepositoryUrl { get; set; }
    }
 
    /// <summary>
    /// The package definition is sourced from a remote package repository server.
    /// </summary>
    public class HttpRepositoryPackageDefSource : IRepositoryPackageDefSource
    {
        /// <summary>
        /// A direct url for downloading the package.
        /// </summary>
        public string DirectUrl { get; set;  }
        /// <summary>
        /// The repository the package is sourced.
        /// </summary>
        public string RepositoryUrl { get; set; }
    }
 
    /// <summary>
    /// The package definition is sourced from a local or remote file system storage. This can be a local folder or a remove shared file system drive.
    /// </summary>
    public class FileRepositoryPackageDefSource : FilePackageDefSource, IRepositoryPackageDefSource
    {
        /// <summary>
        /// The repository the package is sourced.
        /// </summary>
        public string RepositoryUrl { get; set; }
    }
 
    /// <summary>
    /// The package definition is loaded from an package XML file.
    /// </summary>
    public class XmlPackageDefSource : IPackageDefSource
    {
        /// <summary>
        /// The file path to the .xml file of the package definition. 
        /// </summary>
        public string PackageDefFilePath { get; set; }
    }
    
    /// <summary>
    /// The package definition is sourced from an OpenTAP installation.
    /// </summary>
    public class InstalledPackageDefSource : XmlPackageDefSource
    {
        /// <summary>
        /// The installation the package definition is sourced.
        /// </summary>
        public Installation Installation { get; set; }
    }
}