ValueSet Classe

Definizione

Implementa una mappa con chiavi di tipo String e valori di tipo Object. L'oggetto deve essere un valore PropertyValue o ValueSet WinRT. Come PropertyValue, può essere qualsiasi tipo ad eccezione di PropertyTypeInspectableArray. Questa limitazione esiste per garantire che il valore possa essere serializzato; passato per valore attraverso un limite di processo.

Nota

Alcuni membri sono disponibili solo per la lingua specificata.

public ref class ValueSet sealed : IIterable<IKeyValuePair<Platform::String ^, Platform::Object ^> ^>, IMap<Platform::String ^, Platform::Object ^>, IObservableMap<Platform::String ^, Platform::Object ^>, IPropertySet
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.FoundationContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ValueSet final : IIterable<IKeyValuePair<winrt::hstring, IInspectable const&>>, IMap<winrt::hstring, IInspectable const&>, IObservableMap<winrt::hstring, IInspectable const&>, IPropertySet
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.FoundationContract")]
class ValueSet final : IIterable<IKeyValuePair<winrt::hstring, IInspectable const&>>, IMap<winrt::hstring, IInspectable const&>, IObservableMap<winrt::hstring, IInspectable const&>, IPropertySet
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.FoundationContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ValueSet : IDictionary<string,object>, IEnumerable<KeyValuePair<string,object>>, IObservableMap<string,object>, IPropertySet
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.FoundationContract")]
public sealed class ValueSet : IDictionary<string,object>, IEnumerable<KeyValuePair<string,object>>, IObservableMap<string,object>, IPropertySet
function ValueSet()
Public NotInheritable Class ValueSet
Implements IDictionary(Of String, Object), IEnumerable(Of KeyValuePair(Of String, Object)), IObservableMap(Of String, Object), IPropertySet
Ereditarietà
Object Platform::Object IInspectable ValueSet
Attributi
Implementazioni
IMap<K,V> IDictionary<K,V> IMap<String,Object> IDictionary<String,Object> IMap<Platform::String,Platform::Object> IMap<winrt::hstring,IInspectable> IIterable<IKeyValuePair<K,V>> IEnumerable<KeyValuePair<K,V>> IIterable<IKeyValuePair<String,Object>> IEnumerable<KeyValuePair<String,Object>> IIterable<IKeyValuePair<Platform::String,Platform::Object>> IIterable<IKeyValuePair<winrt::hstring,IInspectable>> IObservableMap<String,Object> IObservableMap<Platform::String,Platform::Object> IObservableMap<winrt::hstring,IInspectable> IPropertySet

Requisiti Windows

Famiglia di dispositivi
Windows 10 (è stato introdotto in 10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (è stato introdotto in v1.0)

Costruttori

ValueSet()

Crea e inizializza una nuova istanza del set di proprietà.

Proprietà

Size

Ottiene il numero di elementi contenuti nel set di valori.

Metodi

Clear()

Rimuove tutti gli elementi dal set di valori.

First()

Restituisce un iteratore per enumerare gli elementi nel set di valori.

GetView()

Ottiene una visualizzazione non modificabile del set di valori.

HasKey(String)

Indica se il set di valori ha un elemento con la chiave specificata.

Insert(String, Object)

Aggiunge un elemento al set di valori.

Lookup(String)

Recupera il valore per la chiave specificata.

Remove(String)

Rimuove un elemento dal set di valori.

Eventi

MapChanged

Si verifica quando la mappa osservabile è stata modificata.

Si applica a

Vedi anche