DependencyResolver.ResolveUsing Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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>)
Specifies a resolution function that attempts to return an instance of a specified type.
public static void ResolveUsing(Func<Type,object[],object> resolver);
static member ResolveUsing : Func<Type, obj[], obj> -> unit
Parameters
- resolver
- System.Func<System.Type,System.Object[],System.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 Xamarin.Forms so that it may attempt to resolve the type itself.
Applies to
ResolveUsing(Func<Type,Object>)
Specifies a resolution function that attempts to return an instance of the specified type.
public static void ResolveUsing(Func<Type,object> resolver);
static member ResolveUsing : Func<Type, obj> -> unit
Parameters
- resolver
- System.Func<System.Type,System.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 Xamarin.Forms so that it may attempt to resolve the type itself.