Share via


StringMap Klasse

Definition

Eine assoziative Auflistung, auch als Karte oder Wörterbuch bezeichnet.

public ref class StringMap sealed : IIterable<IKeyValuePair<Platform::String ^, Platform::String ^> ^>, IMap<Platform::String ^, Platform::String ^>, IObservableMap<Platform::String ^, Platform::String ^>
/// [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 StringMap final : IIterable<IKeyValuePair<winrt::hstring, winrt::hstring const&>>, IMap<winrt::hstring, winrt::hstring const&>, IObservableMap<winrt::hstring, winrt::hstring const&>
/// [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 StringMap final : IIterable<IKeyValuePair<winrt::hstring, winrt::hstring const&>>, IMap<winrt::hstring, winrt::hstring const&>, IObservableMap<winrt::hstring, winrt::hstring const&>
[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 StringMap : IDictionary<string,string>, IEnumerable<KeyValuePair<string,string>>, IObservableMap<string,string>
[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 StringMap : IDictionary<string,string>, IEnumerable<KeyValuePair<string,string>>, IObservableMap<string,string>
function StringMap()
Public NotInheritable Class StringMap
Implements IDictionary(Of String, String), IEnumerable(Of KeyValuePair(Of String, String)), IObservableMap(Of String, String)
Vererbung
Object Platform::Object IInspectable StringMap
Attribute
Implementiert
IMap<K,V> IDictionary<K,V> IMap<String,String> IDictionary<String,String> IMap<Platform::String,Platform::String> IMap<winrt::hstring,winrt::hstring> IIterable<IKeyValuePair<K,V>> IEnumerable<KeyValuePair<K,V>> IIterable<IKeyValuePair<String,String>> IEnumerable<KeyValuePair<String,String>> IIterable<IKeyValuePair<Platform::String,Platform::String>> IIterable<IKeyValuePair<winrt::hstring,winrt::hstring>> IObservableMap<String,String> IObservableMap<Platform::String,Platform::String> IObservableMap<winrt::hstring,winrt::hstring>

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (eingeführt in v1.0)

Hinweise

Diese Klasse ermöglicht JavaScript das einfache Durchlaufen einer Auflistung, für die Zeichenfolgen der einzige erwartete Wert für Schlüssel und Werte sind.

Konstruktoren

StringMap()

Erstellt und initialisiert eine neue instance der StringMap.

Eigenschaften

Size

Ruft die Anzahl der Elemente in der Zuordnung ab.

Methoden

Clear()

Entfernt alle Elemente aus der Karte.

First()

Gibt einen Iterator zurück, der die Elemente in der Auflistung enthält.

GetView()

Gibt eine unveränderliche Ansicht der Karte zurück.

HasKey(String)

Bestimmt, ob die Zuordnung den angegebenen Schlüssel enthält.

Insert(String, String)

Fügt ein Element in der Karte ein oder ersetzt es.

Lookup(String)

Gibt das Element am angegebenen Schlüssel in der Zuordnung zurück.

Remove(String)

Entfernt ein Element aus der Karte.

Ereignisse

MapChanged

Tritt auf, wenn sich der Inhalt der Karte ändert.

Gilt für:

Weitere Informationen