dotnet-installer/src/Microsoft.DotNet.Tools.Pack/NuGet/PackageReferenceSet.cs

35 lines
922 B
C#
Raw Normal View History

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using NuGet.Frameworks;
namespace NuGet
{
public class PackageReferenceSet
{
public PackageReferenceSet(IEnumerable<string> references)
: this(null, references)
{
}
public PackageReferenceSet(NuGetFramework targetFramework, IEnumerable<string> references)
{
if (references == null)
{
throw new ArgumentNullException(nameof(references));
}
TargetFramework = targetFramework;
References = references.ToArray();
}
public IReadOnlyCollection<string> References { get; }
public NuGetFramework TargetFramework { get; }
}
}