當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。