CacheRequest.Add Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Aggiunge una proprietà o un identificatore di pattern a un oggetto CacheRequest.
Overload
| Nome | Descrizione |
|---|---|
| Add(AutomationPattern) |
Aggiunge l'identificatore specificato AutomationPattern a questo CacheRequestoggetto . |
| Add(AutomationProperty) |
Aggiunge l'identificatore specificato AutomationProperty a questo CacheRequestoggetto . |
Commenti
Quando viene creato un CacheRequest oggetto, l'identificatore RuntimeIdProperty viene aggiunto come proprietà predefinita per la cache.
L'aggiunta di un oggetto già presente nella richiesta di cache non ha alcun effetto.
Add(AutomationPattern)
Aggiunge l'identificatore specificato AutomationPattern a questo CacheRequestoggetto .
public:
void Add(System::Windows::Automation::AutomationPattern ^ pattern);
public void Add(System.Windows.Automation.AutomationPattern pattern);
member this.Add : System.Windows.Automation.AutomationPattern -> unit
Public Sub Add (pattern As AutomationPattern)
Parametri
- pattern
- AutomationPattern
Identificatore che specifica un modello da memorizzare nella cache.
Eccezioni
è CacheRequest attivo.
Esempio
Nell'esempio seguente viene illustrato come costruire un CacheRequest oggetto e aggiungere un modello da memorizzare nella cache.
CacheRequest cacheRequest = new CacheRequest();
cacheRequest.Add(AutomationElement.NameProperty);
cacheRequest.Add(AutomationElement.IsEnabledProperty);
cacheRequest.Add(SelectionItemPattern.Pattern);
cacheRequest.Add(SelectionItemPattern.SelectionContainerProperty);
Dim myCacheRequest As New CacheRequest()
myCacheRequest.Add(AutomationElement.NameProperty)
myCacheRequest.Add(AutomationElement.IsEnabledProperty)
myCacheRequest.Add(SelectionItemPattern.Pattern)
myCacheRequest.Add(SelectionItemPattern.SelectionContainerProperty)
Commenti
L'aggiunta di un modello già presente nella richiesta di cache non ha alcun effetto.
Vedi anche
- Memorizzazione nella cache nei client di automazione dell'interfaccia utente
- Usare il caching nell'automazione dell'interfaccia utente
Si applica a
Add(AutomationProperty)
Aggiunge l'identificatore specificato AutomationProperty a questo CacheRequestoggetto .
public:
void Add(System::Windows::Automation::AutomationProperty ^ property);
public void Add(System.Windows.Automation.AutomationProperty property);
member this.Add : System.Windows.Automation.AutomationProperty -> unit
Public Sub Add (property As AutomationProperty)
Parametri
- property
- AutomationProperty
Identificatore che specifica un valore della proprietà da memorizzare nella cache.
Eccezioni
è CacheRequest attivo.
Esempio
Nell'esempio seguente viene illustrato come costruire un CacheRequest oggetto e aggiungere una proprietà da memorizzare nella cache.
CacheRequest cacheRequest = new CacheRequest();
cacheRequest.Add(AutomationElement.NameProperty);
cacheRequest.Add(AutomationElement.IsEnabledProperty);
cacheRequest.Add(SelectionItemPattern.Pattern);
cacheRequest.Add(SelectionItemPattern.SelectionContainerProperty);
Dim myCacheRequest As New CacheRequest()
myCacheRequest.Add(AutomationElement.NameProperty)
myCacheRequest.Add(AutomationElement.IsEnabledProperty)
myCacheRequest.Add(SelectionItemPattern.Pattern)
myCacheRequest.Add(SelectionItemPattern.SelectionContainerProperty)
Commenti
Quando viene creato un oggetto CacheRequest , l'identificatore RuntimeIdProperty viene aggiunto come proprietà predefinita per la cache.
L'aggiunta di una proprietà già presente nella richiesta di cache non ha alcun effetto.
Vedi anche
- Memorizzazione nella cache nei client di automazione dell'interfaccia utente
- Usare il caching nell'automazione dell'interfaccia utente