PackageManagementService Class
Implements the features of the Package Management Service. There are two ways to obtain an interface to the PackageManagementService class. If the Host is consuming the PackageManagementService by linking to this assembly, then it is simplest to use the Instance method. If the Host has dynamically loaded this assembly, you can generate an instance of the PackageManagementService that implements an interface you supply by using the GetTypedInstance method. This element is introduced in Windows PowerShell 5.0.
Namespace: Microsoft.OneGet
Assembly: Microsoft.OneGet (in Microsoft.OneGet.dll)
Usage
'Usage
Dim instance As PackageManagementService
Syntax
'Declaration
Public Class PackageManagementService
public class PackageManagementService
public ref class PackageManagementService
public class PackageManagementService
public class PackageManagementService
Example
<![CDATA[
// Manually load the assembly
var asm = Assembly.Load("Microsoft.OneGet.Core.dll" )
// instantiate this object
dynamic pms = Assembly.CreateInstance( "Microsoft.OneGet.PackageManagementService" );
// ask this object to genetrate a dynamic implementation of my own interface.
pms.GetInstance<IMyPackageManagementService>();
]]>
Inheritance Hierarchy
System.Object
Microsoft.OneGet.PackageManagementService
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.