Xamarin.Forms Guides | Samples

Xamarin.Forms.DependencyService Class

Static class that provides the DependencyService.Get<T> factory method for retrieving platform-specific implementations of the specified type T.

See Also: DependencyService

Syntax

public static class DependencyService

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0

The members of Xamarin.Forms.DependencyService are listed below.

See Also: Object

Public Methods

static
Get<T>(DependencyFetchTarget) : T
Returns the platform-specific implementation of type T.
static
Register<T>()
Registers the platform-specific implementation of type T.
static
Register<T,TImpl>()
Registers the platform-specific implementation of type T.