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
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 or sets the value associated with the specified key.
public object this[string key] { get; set; }
Parameters
key
System.String
The key to get the value for
Property Value
Remarks
Setter is obsolete and potentially unstable due to calling async from sync code.
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
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
AttributesDictionary.Clear() Method
Removes all keys and values from the dictionary.
public System.Threading.Tasks.Task Clear();
Returns
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(object) Method
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj);
Parameters
obj
System.Object
The object to compare with the current object.
Returns
System.Boolean
true if the specified object is equal to the current object; otherwise, false.
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
AttributesDictionary.GetHashCode() Method
Serves as the default hash function.
public override int GetHashCode();
Returns
System.Int32
A hash code for the current object.
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
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
AttributesDictionary.explicit operator Dictionary<string,object>(AttributesDictionary) Operator
Implicit 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.implicit operator AttributesDictionary(Dictionary<string,object>) Operator
Implicit conversion from System.Collections.Generic.Dictionary<> to AttributesDictionary.
This is only provided for backwards compatibility and may be removed in a future release.
public static dymaptic.GeoBlazor.Core.Objects.AttributesDictionary implicit operator AttributesDictionary(System.Collections.Generic.Dictionary<string,object> dictionary);
Parameters
dictionary
System.Collections.Generic.Dictionary<System.String,System.Object>
Returns
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