Partager via


DependencyFetchTarget Énumération

Définition

Énumération spécifiant si Get<T>(DependencyFetchTarget) doit retourner une référence à une instance globale ou nouvelle.

public enum class DependencyFetchTarget
public enum DependencyFetchTarget
type DependencyFetchTarget = 
Public Enum DependencyFetchTarget
Héritage
DependencyFetchTarget

Champs

GlobalInstance 0

Retourne une instance globale.

NewInstance 1

Retourne une nouvelle instance.

Remarques

L’exemple suivant montre comment DependencyFetchTarget utiliser pour spécifier une nouvelle instance :

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

S’applique à