VersioningHelper.MakeVersionSafeName Method (String, ResourceScope, ResourceScope, Type)

 

This API supports the product infrastructure and is not intended to be used directly from your code.

Returns a version-safe name based on the specified resource name, the intended resource consumption scope, and the type using the resource.

Namespace:   System.Runtime.Versioning
Assembly:  mscorlib (in mscorlib.dll)

public static string MakeVersionSafeName(
	string name,
	ResourceScope from,
	ResourceScope to,
	Type type
)

Parameters

name
Type: System.String

The name of the resource.

from
Type: System.Runtime.Versioning.ResourceScope

The beginning of the scope range.

to
Type: System.Runtime.Versioning.ResourceScope

The end of the scope range.

type
Type: System.Type

The Type of the resource.

Return Value

Type: System.String

A version-safe name.

Exception Condition
ArgumentException

The values for from and to are invalid. The resource type in the ResourceScope enumeration is going from a more restrictive resource type to a more general resource type.

ArgumentNullException

type is null.

The original name is returned with a scope related suffix.

.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Return to top
Show: