DependencyFetchTarget Enumeração

Definição

Enumeração especificando se Get<T>(DependencyFetchTarget) deve retornar uma referência a uma instância nova ou global.

public enum DependencyFetchTarget
type DependencyFetchTarget = 
Herança
System.Enum
DependencyFetchTarget

Campos

GlobalInstance 0

Retorne uma instância global.

NewInstance 1

Retorne uma nova instância.

Comentários

O exemplo a seguir mostra como DependencyFetchTarget pode ser usado para especificar uma nova instância:

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

Aplica-se a