ElementHandlerExtensions.GetRequiredService 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
GetRequiredService<T>(IElementHandler) | |
GetRequiredService<T>(IElementHandler, Type) |
GetRequiredService<T>(IElementHandler)
- Source:
- ElementHandlerExtensions.cs
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T GetRequiredService(Microsoft::Maui::IElementHandler ^ handler);
public static T GetRequiredService<T> (this Microsoft.Maui.IElementHandler handler);
static member GetRequiredService : Microsoft.Maui.IElementHandler -> 'T
<Extension()>
Public Function GetRequiredService(Of T) (handler As IElementHandler) As T
类型参数
- T
参数
- handler
- IElementHandler
返回
T
适用于
GetRequiredService<T>(IElementHandler, Type)
- Source:
- ElementHandlerExtensions.cs
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T GetRequiredService(Microsoft::Maui::IElementHandler ^ handler, Type ^ type);
public static T GetRequiredService<T> (this Microsoft.Maui.IElementHandler handler, Type type);
static member GetRequiredService : Microsoft.Maui.IElementHandler * Type -> 'T
<Extension()>
Public Function GetRequiredService(Of T) (handler As IElementHandler, type As Type) As T
类型参数
- T
参数
- handler
- IElementHandler
- type
- Type
返回
T