Partager via


DependencyResolver.ResolveUsing Method

Definition

Overloads

ResolveUsing(Func<Type,Object[],Object>)

Specifies a resolution function that attempts to return an instance of a specified type.

ResolveUsing(Func<Type,Object>)

Specifies a resolution function that attempts to return an instance of the specified type.

ResolveUsing(Func<Type,Object[],Object>)

Source:
DependencyResolver.cs
Source:
DependencyResolver.cs

Specifies a resolution function that attempts to return an instance of a specified type.

public:
 static void ResolveUsing(Func<Type ^, cli::array <System::Object ^> ^, System::Object ^> ^ resolver);
public static void ResolveUsing (Func<Type,object[],object> resolver);
static member ResolveUsing : Func<Type, obj[], obj> -> unit
Public Shared Sub ResolveUsing (resolver As Func(Of Type, Object(), Object))

Parameters

resolver
Func<Type,Object[],Object>

A function that returns an instance of a type from an array that provides matching types, or null if the type is not supported.

Remarks

resolver must return null for types that it does not support, because a return value of null passes the type through to Microsoft.Maui.Controls so that it may attempt to resolve the type itself.

Applies to

ResolveUsing(Func<Type,Object>)

Source:
DependencyResolver.cs
Source:
DependencyResolver.cs

Specifies a resolution function that attempts to return an instance of the specified type.

public:
 static void ResolveUsing(Func<Type ^, System::Object ^> ^ resolver);
public static void ResolveUsing (Func<Type,object> resolver);
static member ResolveUsing : Func<Type, obj> -> unit
Public Shared Sub ResolveUsing (resolver As Func(Of Type, Object))

Parameters

resolver
Func<Type,Object>

A function that returns an instance of a type, or null if the type is not supported.

Remarks

resolver must return null for types that it does not support, because a return value of null passes the type through to Microsoft.Maui.Controls so that it may attempt to resolve the type itself.

Applies to