IResourceUrlGenerator.GetResourceUrl(Type, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回对嵌入式资源(位于在设计时使用的程序集中)的 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
要检索的资源的名称。
返回
对资源的 URL 引用。
注解
在运行时, GetWebResourceUrl 方法返回资源的 URL。 AssemblyResourceLoader类定义用于加载嵌入资源的 HTTP 处理程序。
在设计时, GetWebResourceUrl 类的方法 ClientScriptManager 检测设计模式并委托给设计器宿主服务实现,该实现返回 URL。