2015-11-16 11:21:57 -08:00
|
|
|
// 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.
|
2015-11-12 03:50:38 -08:00
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using NuGet.Frameworks;
|
|
|
|
|
2016-08-10 10:50:18 -07:00
|
|
|
namespace NuGet.Legacy
|
2015-11-12 03:50:38 -08:00
|
|
|
{
|
|
|
|
public class PackageReferenceSet
|
|
|
|
{
|
|
|
|
public PackageReferenceSet(IEnumerable<string> references)
|
2016-01-12 10:12:55 -08:00
|
|
|
: this((NuGetFramework)null, references)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public PackageReferenceSet(string targetFramework, IEnumerable<string> references)
|
|
|
|
: this(targetFramework != null ? NuGetFramework.Parse(targetFramework) : null, references)
|
2015-11-12 03:50:38 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
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; }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|