-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathIServerAPICalls.cs
More file actions
89 lines (77 loc) · 3.88 KB
/
Copy pathIServerAPICalls.cs
File metadata and controls
89 lines (77 loc) · 3.88 KB
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Microsoft.PowerShell.PSResourceGet.UtilClasses;
using NuGet.Versioning;
using System.IO;
using System.Management.Automation;
using System.Runtime.ExceptionServices;
public interface IServerAPICalls
{
#region Methods
/// <summary>
/// Find method which allows for searching for all packages from a repository and returns latest version for each.
/// Examples: Search -Repository PSGallery
/// </summary>
FindResults FindAll(bool includePrerelease, ResourceType type, out ErrorRecord errRecord);
/// <summary>
/// Find method which allows for searching for packages with tag from a repository and returns latest version for each.
/// Examples: Search -Tag "JSON" -Repository PSGallery
/// </summary>
FindResults FindTags(string[] tags, bool includePrerelease, ResourceType _type, out ErrorRecord errRecord);
/// <summary>
/// Find method which allows for searching for single name and returns latest version.
/// Name: no wildcard support
/// Examples: Search "PowerShellGet"
/// </summary>
FindResults FindName(string packageName, bool includePrerelease, ResourceType type, out ErrorRecord errRecord);
/// <summary>
/// Find method which allows for searching for single name and returns latest version.
/// Name: no wildcard support
/// Examples: Search "PowerShellGet" -Tag "Provider"
/// </summary>
FindResults FindNameWithTag(string packageName, string[] tags, bool includePrerelease, ResourceType type, out ErrorRecord errRecord);
/// <summary>
/// Find method which allows for searching for single name with version range.
/// Name: no wildcard support
/// Version: supports wildcards
/// Examples: Search "PowerShellGet" "[3.0.0.0, 5.0.0.0]"
/// Search "PowerShellGet" "3.*"
/// </summary>
FindResults FindNameGlobbing(string packageName, bool includePrerelease, ResourceType type, out ErrorRecord errRecord);
/// <summary>
/// Find method which allows for searching for single name and tag with version range.
/// Name: no wildcard support
/// Version: supports wildcards
/// Examples: Search "PowerShellGet" "[3.0.0.0, 5.0.0.0]"
/// Search "PowerShellGet" "3.*"
/// </summary>
FindResults FindNameGlobbingWithTag(string packageName, string[] tags, bool includePrerelease, ResourceType type, out ErrorRecord errRecord);
/// <summary>
/// Find method which allows for searching for single name with specific version.
/// Name: no wildcard support
/// Version: no wildcard support
/// Examples: Search "PowerShellGet" "2.2.5"
/// </summary>
FindResults FindVersionGlobbing(string packageName, VersionRange versionRange, bool includePrerelease, ResourceType type, bool getOnlyLatest, out ErrorRecord errRecord);
// <summary>
/// Find method which allows for searching for single name with specific version.
/// Name: no wildcard support
/// Version: no wildcard support
/// Examples: Search "PowerShellGet" "2.2.5"
/// </summary>
FindResults FindVersion(string packageName, string version, ResourceType type, out ErrorRecord errRecord);
// <summary>
/// Find method which allows for searching for single name and tag with specific version.
/// Name: no wildcard support
/// Version: no wildcard support
/// Examples: Search "PowerShellGet" "2.2.5" -Tag "Provider"
/// </summary>
FindResults FindVersionWithTag(string packageName, string version, string[] tags, ResourceType type, out ErrorRecord errRecord);
/// <summary>
/// Installs specific package.
/// Name: no wildcard support.
/// Examples: Install "PowerShellGet"
/// </summary>
Stream InstallPackage(string packageName, string packageVersion, bool includePrerelease, out ErrorRecord errRecord);
#endregion
}