Interface INuGetHostContext
Namespace: LemonEdge.NuGetManager.Host
Assembly: LemonEdge.NuGetManager.dll
Syntax
public interface INuGetHostContext
Methods
GetHostFrameworkVersion(IEnumerable<FrameworkSpecificGroup>)
Selects the NuGet.Packaging.FrameworkSpecificGroup that is nearest to the INuGetHostContext.GetTargetFramework() otherwise null
Declaration
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?)
Gets the target framework of the entry assembly. GetEntryAssembly()
Declaration
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
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 |