Share via


DependencyFetchTarget Enumerazione

Definizione

Enumerazione che specifica se Get<T>(DependencyFetchTarget) deve restituire un riferimento a un'istanza globale o nuova.

public enum DependencyFetchTarget
type DependencyFetchTarget = 
Ereditarietà
System.Enum
DependencyFetchTarget

Campi

GlobalInstance 0

Restituisce un'istanza globale.

NewInstance 1

Restituisce un'istanza nuova.

Commenti

Nell'esempio seguente viene illustrato come DependencyFetchTarget usare per specificare una nuova istanza:

var secondFetch = DependencyService.Get<IDependencyTest> (DependencyFetchTarget.NewInstance);

Si applica a