本文整理汇总了C#中NuGet.Versioning.NuGetVersion.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# NuGetVersion.ToString方法的具体用法?C# NuGetVersion.ToString怎么用?C# NuGetVersion.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NuGet.Versioning.NuGetVersion
的用法示例。
在下文中一共展示了NuGetVersion.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetNupkgStreamAsync
public override Task<Stream> GetNupkgStreamAsync(string id, NuGetVersion version, CancellationToken token)
{
var info = GetPackageInfo(id, version);
Stream result = null;
if (info != null)
{
var packagePath = Path.Combine(info.Path, $"{id}.{version.ToString()}.nupkg");
result = File.OpenRead(packagePath);
}
return Task.FromResult(result);
}
示例2: NuGetVersion
public NuGetVersion(NuGetVersion version)
: this(version.Version, version.ReleaseLabels, version.Metadata, version.ToString())
{
}
示例3: AddPackageVersionToComboBox
void AddPackageVersionToComboBox (NuGetVersion version)
{
packageVersionComboBox.Items.Add (version, version.ToString ());
}
示例4: GetNuGetVersionString
static string GetNuGetVersionString (NuGetVersion version)
{
if (version != null)
return version.ToString ();
return null;
}
示例5: GetReportAbuseUrl
//public ReportAbuseResourceV3(IEnumerable<Uri> reportAbuseTemplates)
//{
// if (reportAbuseTemplates == null || !reportAbuseTemplates.Any())
// {
// throw new ArgumentNullException("reportAbuseTemplates");
// }
// _reportAbuseTemplates = reportAbuseTemplates;
//}
/// <summary>
/// Gets a URL for reporting package abuse. The URL will not be verified to exist.
/// </summary>
/// <param name="id">The package id (natural casing)</param>
/// <param name="version">The package version</param>
/// <returns>The first URL from the resource, with the URI template applied.</returns>
public Uri GetReportAbuseUrl(string id, NuGetVersion version)
{
//return Utility.ApplyPackageIdVersionToUriTemplate(_reportAbuseTemplates.First(), id, version);
return new Uri(String.Format(CultureInfo.InvariantCulture, "https://www.nuget.org/packages/{0}/{1}/ReportAbuse", id, version.ToString()));
}
示例6: ToStringConstructedFromVersionAndSpecialVersionConstructor
public void ToStringConstructedFromVersionAndSpecialVersionConstructor(Version version, string specialVersion, string expected)
{
// Act
NuGetVersion semVer = new NuGetVersion(version, specialVersion);
// Assert
Assert.Equal(expected, semVer.ToString());
}
示例7: GetPackageDirectory
private string GetPackageDirectory(string packageId, NuGetVersion version)
{
return Path.Combine(packageId, version.ToString());
}