Compartir a través de


MauiHandlersCollectionExtensions.AddHandler Método

Definición

Sobrecargas

AddHandler(IMauiHandlersCollection, Type, Type)

Registra un controlador con el contenedor de servicios subyacente a través de AddTransient.

AddHandler<TType,TTypeRender>(IMauiHandlersCollection)

Registra un controlador con el contenedor de servicios subyacente a través de AddTransient.

AddHandler<TType>(IMauiHandlersCollection, Func<IServiceProvider,IElementHandler>)

Registra un controlador con el contenedor de servicios subyacente a través de AddTransient.

AddHandler(IMauiHandlersCollection, Type, Type)

Source:
MauiHandlersCollectionExtensions.cs
Source:
MauiHandlersCollectionExtensions.cs

Registra un controlador con el contenedor de servicios subyacente a través de AddTransient.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Maui::Hosting::IMauiHandlersCollection ^ AddHandler(Microsoft::Maui::Hosting::IMauiHandlersCollection ^ handlersCollection, Type ^ viewType, Type ^ handlerType);
public static Microsoft.Maui.Hosting.IMauiHandlersCollection AddHandler (this Microsoft.Maui.Hosting.IMauiHandlersCollection handlersCollection, Type viewType, Type handlerType);
static member AddHandler : Microsoft.Maui.Hosting.IMauiHandlersCollection * Type * Type -> Microsoft.Maui.Hosting.IMauiHandlersCollection
<Extension()>
Public Function AddHandler (handlersCollection As IMauiHandlersCollection, viewType As Type, handlerType As Type) As IMauiHandlersCollection

Parámetros

handlersCollection
IMauiHandlersCollection

Colección de elementos

viewType
Type

Tipo de vista que se va a registrar

handlerType
Type

Tipo de controlador que representa el elemento

Devoluciones

Colección de controladores

Se aplica a

AddHandler<TType,TTypeRender>(IMauiHandlersCollection)

Source:
MauiHandlersCollectionExtensions.cs
Source:
MauiHandlersCollectionExtensions.cs

Registra un controlador con el contenedor de servicios subyacente a través de AddTransient.

public:
generic <typename TType, typename TTypeRender>
 where TType : Microsoft::Maui::IElement where TTypeRender : Microsoft::Maui::IElementHandler[System::Runtime::CompilerServices::Extension]
 static Microsoft::Maui::Hosting::IMauiHandlersCollection ^ AddHandler(Microsoft::Maui::Hosting::IMauiHandlersCollection ^ handlersCollection);
public static Microsoft.Maui.Hosting.IMauiHandlersCollection AddHandler<TType,TTypeRender> (this Microsoft.Maui.Hosting.IMauiHandlersCollection handlersCollection) where TType : Microsoft.Maui.IElement where TTypeRender : Microsoft.Maui.IElementHandler;
static member AddHandler : Microsoft.Maui.Hosting.IMauiHandlersCollection -> Microsoft.Maui.Hosting.IMauiHandlersCollection (requires 'ype :> Microsoft.Maui.IElement and 'ypeRender :> Microsoft.Maui.IElementHandler)
<Extension()>
Public Function AddHandler(Of TType As IElement, TTypeRender As IElement) (handlersCollection As IMauiHandlersCollection) As IMauiHandlersCollection

Parámetros de tipo

TType

Tipo de elemento que se va a registrar

TTypeRender

Tipo de controlador que representa el elemento

Parámetros

handlersCollection
IMauiHandlersCollection

Colección de controladores

Devoluciones

Colección de controladores

Se aplica a

AddHandler<TType>(IMauiHandlersCollection, Func<IServiceProvider,IElementHandler>)

Source:
MauiHandlersCollectionExtensions.cs
Source:
MauiHandlersCollectionExtensions.cs

Registra un controlador con el contenedor de servicios subyacente a través de AddTransient.

public:
generic <typename TType>
 where TType : Microsoft::Maui::IElement[System::Runtime::CompilerServices::Extension]
 static Microsoft::Maui::Hosting::IMauiHandlersCollection ^ AddHandler(Microsoft::Maui::Hosting::IMauiHandlersCollection ^ handlersCollection, Func<IServiceProvider ^, Microsoft::Maui::IElementHandler ^> ^ handlerImplementationFactory);
public static Microsoft.Maui.Hosting.IMauiHandlersCollection AddHandler<TType> (this Microsoft.Maui.Hosting.IMauiHandlersCollection handlersCollection, Func<IServiceProvider,Microsoft.Maui.IElementHandler> handlerImplementationFactory) where TType : Microsoft.Maui.IElement;
static member AddHandler : Microsoft.Maui.Hosting.IMauiHandlersCollection * Func<IServiceProvider, Microsoft.Maui.IElementHandler> -> Microsoft.Maui.Hosting.IMauiHandlersCollection (requires 'ype :> Microsoft.Maui.IElement)
<Extension()>
Public Function AddHandler(Of TType As IElement) (handlersCollection As IMauiHandlersCollection, handlerImplementationFactory As Func(Of IServiceProvider, IElementHandler)) As IMauiHandlersCollection

Parámetros de tipo

TType

Tipo de elemento que se va a registrar

Parámetros

handlersCollection
IMauiHandlersCollection

Colección de controladores

handlerImplementationFactory
Func<IServiceProvider,IElementHandler>

Un método de fábrica para crear el controlador

Devoluciones

Colección de controladores

Se aplica a