当前位置: 首页>>代码示例>>C#>>正文


C# NuGetVersion.ToString方法代码示例

本文整理汇总了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);
        }
开发者ID:eerhardt,项目名称:NuGet3,代码行数:12,代码来源:LocalV3FindPackageByIdResource.cs

示例2: NuGetVersion

        public NuGetVersion(NuGetVersion version)
            : this(version.Version, version.ReleaseLabels, version.Metadata, version.ToString())
        {

        }
开发者ID:rikoe,项目名称:nuget,代码行数:5,代码来源:NuGetVersion.cs

示例3: AddPackageVersionToComboBox

		void AddPackageVersionToComboBox (NuGetVersion version)
		{
			packageVersionComboBox.Items.Add (version, version.ToString ());
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:4,代码来源:AddPackagesDialog.cs

示例4: GetNuGetVersionString

		static string GetNuGetVersionString (NuGetVersion version)
		{
			if (version != null)
				return version.ToString ();

			return null;
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:7,代码来源:PackageManagementProjectOperations.cs

示例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()));
        }
开发者ID:eerhardt,项目名称:NuGet3,代码行数:21,代码来源:ReportAbuseResourceV3.cs

示例6: ToStringConstructedFromVersionAndSpecialVersionConstructor

        public void ToStringConstructedFromVersionAndSpecialVersionConstructor(Version version, string specialVersion, string expected)
        {
            // Act
            NuGetVersion semVer = new NuGetVersion(version, specialVersion);

            // Assert
            Assert.Equal(expected, semVer.ToString());
        }
开发者ID:rikoe,项目名称:nuget,代码行数:8,代码来源:NuGetVersionTest.cs

示例7: GetPackageDirectory

 private string GetPackageDirectory(string packageId, NuGetVersion version)
 {
     return Path.Combine(packageId, version.ToString());
 }
开发者ID:elanwu123,项目名称:dnx,代码行数:4,代码来源:PackagePathResolver.cs


注:本文中的NuGet.Versioning.NuGetVersion.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。