DependencyService.Get(DependencyFetchTarget) DependencyService.Get(DependencyFetchTarget) Method

Definition

Returns the platform-specific implementation of type T.

public static T Get<T> (Xamarin.Forms.DependencyFetchTarget fetchTarget = Xamarin.Forms.DependencyFetchTarget.GlobalInstance) where T : class;
static member Get : Xamarin.Forms.DependencyFetchTarget -> 'T (requires 'T : null)

Type Parameters

T

The type of object to fetch.

Parameters

fetchTarget
DependencyFetchTarget DependencyFetchTarget

The dependency fetch target.

Returns

T T

Applies to