DependencyService.Resolve<T>(DependencyFetchTarget) 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.
The method to use to resolve dependencies by type.
public static T Resolve<T> (Xamarin.Forms.DependencyFetchTarget fallbackFetchTarget = Xamarin.Forms.DependencyFetchTarget.GlobalInstance) where T : class;
static member Resolve : Xamarin.Forms.DependencyFetchTarget -> 'T (requires 'T : null)
Type Parameters
- T
The type to resolve.
Parameters
- fallbackFetchTarget
- DependencyFetchTarget
The fetch target to use if fetching initially fails.
Returns
T
The resolved dependency instance.