語言

VersioningHelper.MakeVersionSafeName 方法

定義

提供一個版本安全的名稱。

多載

名稱 Description
MakeVersionSafeName(String, ResourceScope, ResourceScope)

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

根據指定的資源名稱及預期的資源消耗來源,回傳一個版本安全的名稱。

MakeVersionSafeName(String, ResourceScope, ResourceScope, Type)

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

會根據指定的資源名稱、預期的資源消耗範圍及使用該資源的類型,回傳一個版本安全的名稱。

MakeVersionSafeName(String, ResourceScope, ResourceScope)

來源:
VersioningHelper.cs
來源:
VersioningHelper.cs
來源:
VersioningHelper.cs
來源:
VersioningHelper.cs
來源:
VersioningHelper.cs

根據指定的資源名稱及預期的資源消耗來源,回傳一個版本安全的名稱。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public:
 static System::String ^ MakeVersionSafeName(System::String ^ name, System::Runtime::Versioning::ResourceScope from, System::Runtime::Versioning::ResourceScope to);
public static string MakeVersionSafeName(string? name, System.Runtime.Versioning.ResourceScope from, System.Runtime.Versioning.ResourceScope to);
public static string MakeVersionSafeName(string name, System.Runtime.Versioning.ResourceScope from, System.Runtime.Versioning.ResourceScope to);
static member MakeVersionSafeName : string * System.Runtime.Versioning.ResourceScope * System.Runtime.Versioning.ResourceScope -> string
Public Shared Function MakeVersionSafeName (name As String, from As ResourceScope, to As ResourceScope) As String

參數

name
String

資源名稱。

from
ResourceScope

資源的範圍。

to
ResourceScope

期望的資源消耗範圍。

傳回

一個版本安全的名稱。

備註

原始名稱會加上與範圍相關的後綴。 後綴可包含程序身份、當前 AppDomain 身份,或兩者兼具。

適用於

MakeVersionSafeName(String, ResourceScope, ResourceScope, Type)

來源:
VersioningHelper.cs
來源:
VersioningHelper.cs
來源:
VersioningHelper.cs
來源:
VersioningHelper.cs
來源:
VersioningHelper.cs

會根據指定的資源名稱、預期的資源消耗範圍及使用該資源的類型,回傳一個版本安全的名稱。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public:
 static System::String ^ MakeVersionSafeName(System::String ^ name, System::Runtime::Versioning::ResourceScope from, System::Runtime::Versioning::ResourceScope to, Type ^ type);
public static string MakeVersionSafeName(string? name, System.Runtime.Versioning.ResourceScope from, System.Runtime.Versioning.ResourceScope to, Type? type);
public static string MakeVersionSafeName(string name, System.Runtime.Versioning.ResourceScope from, System.Runtime.Versioning.ResourceScope to, Type type);
static member MakeVersionSafeName : string * System.Runtime.Versioning.ResourceScope * System.Runtime.Versioning.ResourceScope * Type -> string
Public Shared Function MakeVersionSafeName (name As String, from As ResourceScope, to As ResourceScope, type As Type) As String

參數

name
String

資源名稱。

from
ResourceScope

瞄準鏡範圍的起點。

to
ResourceScope

瞄準鏡範圍的末端。

type
Type

資源的意義 Type 。

傳回

一個版本安全的名稱。

例外狀況

和 from 的to值是無效的。 列舉中的 ResourceScope 資源類型正從較為限制的資源類型轉變為更通用的資源類型。

type 是 null。

備註

原始名稱會加上與範圍相關的後綴。

適用於