Skip to content
Jianyun edited this page Feb 25, 2016 · 8 revisions

PackageSource class

Supported PowerShell Streams :

# Supported streams:  
Write-Output  
Write-Warning
Write-Error
Write-Verbose
...

See [PackageProviderFunctions.psm1] (https://github.com/OneGet/oneget/blob/master/Providers/Inbox/PowerShell.MetaProvider/) for more streams.

Streams are captured and sent thru to send supported content back to the host. Unsupported content is dropped.

The Request class represents the current request context and provides access to OneGet functionality.

In PowerShell, the Request is exposed to the PowerShell session as $request and the Provider implementer does not need to specify a parameter for the value.

Property Type Description
IsCancelled bool indicates that the host has cancelled the operation, function should exit asap.
IsElevated bool indicates that the current process is elevated
PackageSources IEnumerable<string> a collection of strings representing the specified sources -- may be names or locations. Empty or null collection indicates "all"
Credential PSCredential any credential passed in from the user
Options Hashtable a set of key-value pairs of the dynamic options specified by the user
PackageManagementService PackageManagementService returns a reference to the [[PackageManagementService

For methods and other details, see the PSRequest class defined here (https://github.com/OneGet/oneget/blob/master/Providers/Inbox/PowerShell.MetaProvider/Request.cs).