layout: default title: AttributesDictionary parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Objects

AttributesDictionary Class

Dictionary of Graphic Attributes that can be asynchronously updated

public class AttributesDictionary :
System.IEquatable<dymaptic.GeoBlazor.Core.Objects.AttributesDictionary>

Inheritance System.Object 🡒 AttributesDictionary

Implements System.IEquatable<AttributesDictionary>

Constructors

AttributesDictionary() Constructor

Constructor

public AttributesDictionary();

AttributesDictionary(Dictionary<string,object>) Constructor

Constructor from existing dictionary

public AttributesDictionary(System.Collections.Generic.Dictionary<string,object?> dictionary);

Parameters

dictionary System.Collections.Generic.Dictionary<System.String,System.Object>

The dictionary to use

Properties

AttributesDictionary.Count Property

The number of attribute entries in the dictionary

public int Count { get; }

Property Value

System.Int32

AttributesDictionary.Keys Property

Returns all the keys in the dictionary

public System.Collections.Generic.Dictionary<string,object?>.KeyCollection Keys { get; }

Property Value

System.Collections.Generic.Dictionary.KeyCollection<System.String,System.Object>

AttributesDictionary.OnChange Property

Event that is fired when an attribute is added, updated or removed

public System.Func<System.Threading.Tasks.Task>? OnChange { get; set; }

Property Value

System.Func<System.Threading.Tasks.Task>

AttributesDictionary.this[string] Property

Gets the value associated with the specified key.

public object? this[string key] { get; }

Parameters

key System.String

The key to get the value for

Property Value

System.Object

AttributesDictionary.Values Property

Returns all the values in the dictionary

public System.Collections.Generic.Dictionary<string,object?>.ValueCollection Values { get; }

Property Value

System.Collections.Generic.Dictionary.ValueCollection<System.String,System.Object>

Methods

AttributesDictionary.AddOrUpdate(string, object) Method

Adds or updates the value associated with the specified key.

public System.Threading.Tasks.Task AddOrUpdate(string key, object value);

Parameters

key System.String

The key to add or update

value System.Object

The value to add or update

Returns

System.Threading.Tasks.Task

AttributesDictionary.AddOrUpdate(Dictionary<string,object>) Method

Updates the AttributesDictionary with new key/value pairs from a System.Collections.Generic.Dictionary<>

public System.Threading.Tasks.Task AddOrUpdate(System.Collections.Generic.Dictionary<string,object> newEntries);

Parameters

newEntries System.Collections.Generic.Dictionary<System.String,System.Object>

The new key/value pairs to add or update

Returns

System.Threading.Tasks.Task

AttributesDictionary.Clear() Method

Removes all keys and values from the dictionary.

public System.Threading.Tasks.Task Clear();

Returns

System.Threading.Tasks.Task

AttributesDictionary.ContainsKey(string) Method

Determines whether the dictionary contains the specified key.

public bool ContainsKey(string key);

Parameters

key System.String

The key to locate in the dictionary

Returns

System.Boolean
True if the key was found, false otherwise.

AttributesDictionary.ContainsValue(object) Method

Determines whether the dictionary contains the specified value.

public bool ContainsValue(object value);

Parameters

value System.Object

The value to locate in the dictionary

Returns

System.Boolean
True if the value was found, false otherwise.

AttributesDictionary.Equals(Dictionary<string,object>) Method

Determines whether the dictionary contains the same keys and values as the specified dictionary.

public bool Equals(System.Collections.Generic.Dictionary<string,object> otherDictionary);

Parameters

otherDictionary System.Collections.Generic.Dictionary<System.String,System.Object>

Returns

System.Boolean

AttributesDictionary.Remove(string) Method

Removes the value associated with the specified key.

public System.Threading.Tasks.Task Remove(string key);

Parameters

key System.String

The key to remove

Returns

System.Threading.Tasks.Task

AttributesDictionary.TryGetValue(string, object) Method

Attempts to get the value associated with the specified key from the dictionary.

public bool TryGetValue(string key, out object? value);

Parameters

key System.String

The key to search for

value System.Object

Out parameter for the found value, if any. If not found, returns the default value for the type.

Returns

System.Boolean
True if the key was found, false otherwise.

Operators

AttributesDictionary.operator ==(AttributesDictionary, AttributesDictionary) Operator

Equality operator

public static bool operator ==(dymaptic.GeoBlazor.Core.Objects.AttributesDictionary left, dymaptic.GeoBlazor.Core.Objects.AttributesDictionary right);

Parameters

left AttributesDictionary

right AttributesDictionary

Returns

System.Boolean

AttributesDictionary.explicit operator Dictionary<string,object>(AttributesDictionary) Operator

Explicit conversion from AttributesDictionary to System.Collections.Generic.Dictionary<>.

public static System.Collections.Generic.Dictionary<string,object?> explicit operator Dictionary<string,object?>(dymaptic.GeoBlazor.Core.Objects.AttributesDictionary attributesDictionary);

Parameters

attributesDictionary AttributesDictionary

Returns

System.Collections.Generic.Dictionary<System.String,System.Object>

AttributesDictionary.operator !=(AttributesDictionary, AttributesDictionary) Operator

Inequality operator

public static bool operator !=(dymaptic.GeoBlazor.Core.Objects.AttributesDictionary? left, dymaptic.GeoBlazor.Core.Objects.AttributesDictionary? right);

Parameters

left AttributesDictionary

right AttributesDictionary

Returns

System.Boolean