Class NuGetHostContext
Inheritance
NuGetHostContext
Assembly: LemonEdge.NuGetManager.dll
Syntax
public class NuGetHostContext : INuGetHostContext
Constructors
NuGetHostContext(IDependencyContextWrapper)
Declaration
public NuGetHostContext(IDependencyContextWrapper dependencyContextWrapper)
Parameters
Methods
GetHostFrameworkVersion(IEnumerable<FrameworkSpecificGroup>)
Selects the NuGet.Packaging.FrameworkSpecificGroup that is nearest to the INuGetHostContext.GetTargetFramework() otherwise null
Declaration
public FrameworkSpecificGroup? GetHostFrameworkVersion(IEnumerable<FrameworkSpecificGroup> groups)
Parameters
Type |
Name |
Description |
IEnumerable<FrameworkSpecificGroup> |
groups |
The collection of NuGet.Packaging.FrameworkSpecificGroup
|
Returns
Type |
Description |
FrameworkSpecificGroup |
A NuGet.Packaging.FrameworkSpecificGroup or null
|
GetTargetFramework(Assembly?)
Declaration
public NuGetFramework GetTargetFramework(Assembly? hostAssembly = null)
Parameters
Type |
Name |
Description |
Assembly |
hostAssembly |
|
Returns
Type |
Description |
NuGetFramework |
|
IsDependencySuppliedByHost(PackageDependency)
Checks whether the NuGet.Packaging.Core.PackageDependency is already supplied by by the current Host
Declaration
public bool IsDependencySuppliedByHost(PackageDependency dep)
Parameters
Type |
Name |
Description |
PackageDependency |
dep |
|
Returns
Type |
Description |
bool |
True if the dependency is supplied by the host, otherwise false
|
Implements
Extension Methods