dotnet-installer/src/Microsoft.Extensions.DependencyModel/RuntimeLibrary.cs

46 lines
1.4 KiB
C#
Raw Normal View History

// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.Extensions.DependencyModel
{
public class RuntimeLibrary : Library
{
2016-02-25 11:00:48 -08:00
public RuntimeLibrary(
string libraryType,
string packageName,
string version,
string hash,
string[] assemblies,
RuntimeTarget[] subTargets,
Dependency[] dependencies,
bool serviceable)
: base(libraryType, packageName, version, hash, dependencies, serviceable)
{
Assemblies = assemblies.Select(path => new RuntimeAssembly(path)).ToArray();
2016-02-25 11:00:48 -08:00
SubTargets = subTargets;
}
public IReadOnlyList<RuntimeAssembly> Assemblies { get; }
2016-02-25 11:00:48 -08:00
public IReadOnlyList<RuntimeTarget> SubTargets { get; }
}
public class RuntimeTarget
{
public RuntimeTarget(string runtime, IReadOnlyList<RuntimeAssembly> assemblies, IReadOnlyList<string> nativeLibraries)
{
Runtime = runtime;
Assemblies = assemblies;
NativeLibraries = nativeLibraries;
}
public string Runtime { get; }
public IReadOnlyList<RuntimeAssembly> Assemblies { get; }
public IReadOnlyList<string> NativeLibraries { get; }
}
}