ValueSet Class

Definition

Implements a map with keys of type String and values of type Object. Object must be a WinRT PropertyValue or ValueSet. As a PropertyValue, it can be any type except PropertyType InspectableArray. This limitation exists to ensure that the value can be serialized; passed by value accoss a process boundary.

Note

Some members are only available for the specified language.

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.DualApiPartition(version=167772160)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ValueSet sealed : 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.DualApiPartition(version=167772160)]
/// [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 sealed : 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.DualApiPartition(version=167772160)]
[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.DualApiPartition(version=167772160)]
[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
Inheritance
ValueSet
Attributes
Implements

Windows 10 requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (introduced in v1.0)

Constructors

ValueSet()

Creates and initializes a new instance of the property set.

Properties

Size

Gets the number of items contained in the value set.

Methods

Clear()

Removes all items from the value set.

First()

Returns an iterator to enumerate the items in the value set.

GetView()

Gets an immutable view of the value set.

HasKey(String)

Indicates whether the value set has an item with the specified key.

Insert(String, Object)

Adds an item to the value set.

Lookup(String)

Retrieves the value for the specified key.

Remove(String)

Removes an item from the value set.

Events

MapChanged

Occurs when the observable map has changed.

Applies to

See also