IResourceUrlGenerator.GetResourceUrl(Type, String) 方法

定义

返回对嵌入式资源(位于在设计时使用的程序集中)的 URL 引用。

public:
 System::String ^ GetResourceUrl(Type ^ type, System::String ^ resourceName);
public string GetResourceUrl (Type type, string resourceName);
abstract member GetResourceUrl : Type * string -> string
Public Function GetResourceUrl (type As Type, resourceName As String) As String

参数

type
Type

包含嵌入式资源的程序集中的类型。

resourceName
String

要检索的资源的名称。

返回

String

对资源的 URL 引用。

注解

在运行时, GetWebResourceUrl 方法返回资源的 URL。 AssemblyResourceLoader类定义用于加载嵌入资源的 HTTP 处理程序。

在设计时, GetWebResourceUrl 类的方法 ClientScriptManager 检测设计模式并委托给设计器宿主服务实现,该实现返回 URL。

适用于

另请参阅