Class AdditionalPropertyBag
- Namespace
- GroupeIsa.Neos.Shared.MultiTenant
- Assembly
- GroupeIsa.Neos.Shared.dll
Represents a property bag for storing additional properties as key-value pairs, where values are serialized as JSON strings. Provides type-safe accessors for common types.
public class AdditionalPropertyBag : Dictionary<string, string?>, IDictionary<string, string?>, ICollection<KeyValuePair<string, string?>>, IReadOnlyDictionary<string, string?>, IReadOnlyCollection<KeyValuePair<string, string?>>, IEnumerable<KeyValuePair<string, string?>>, IDictionary, ICollection, IEnumerable, IDeserializationCallback, ISerializable
- Inheritance
-
AdditionalPropertyBag
- Implements
- Inherited Members
- Extension Methods
Constructors
AdditionalPropertyBag()
Initializes a new instance of the AdditionalPropertyBag class.
public AdditionalPropertyBag()
AdditionalPropertyBag(IDictionary<string, string?>)
Initializes a new instance of the AdditionalPropertyBag class.
public AdditionalPropertyBag(IDictionary<string, string?> dictionary)
Parameters
dictionaryIDictionary<string, string>The dictionary whose elements are copied to this instance.
Methods
GetBoolean(string)
Gets the value associated with the specified property name and deserializes it as a bool.
public bool GetBoolean(string name)
Parameters
namestringThe property name of the value to get.
Returns
- bool
The deserialized boolean value.
GetDateTime(string)
Gets the value associated with the specified property name and deserializes it as a DateTime.
public DateTime GetDateTime(string name)
Parameters
namestringThe property name of the value to get.
Returns
GetDecimal(string)
Gets the value associated with the specified property name and deserializes it as a decimal.
public decimal GetDecimal(string name)
Parameters
namestringThe property name of the value to get.
Returns
- decimal
The deserialized decimal value.
GetEnum<TEnum>(string)
Gets the value associated with the specified property name and deserializes it as the specified enum type.
public TEnum GetEnum<TEnum>(string name) where TEnum : struct, Enum
Parameters
namestringThe property name of the value to get.
Returns
- TEnum
The deserialized enum value.
Type Parameters
TEnumThe enum type to deserialize to.
GetGuid(string)
Gets the value associated with the specified property name and deserializes it as a Guid.
public Guid GetGuid(string name)
Parameters
namestringThe property name of the value to get.
Returns
GetInteger(string)
Gets the value associated with the specified property name and deserializes it as an int.
public int GetInteger(string name)
Parameters
namestringThe property name of the value to get.
Returns
- int
The deserialized integer value.
GetLocalizableString(string)
Gets the value associated with the specified property name and deserializes it as a LocalizableString.
public LocalizableString? GetLocalizableString(string name)
Parameters
namestringThe property name of the value to get.
Returns
- LocalizableString
The deserialized long value.
GetLong(string)
Gets the value associated with the specified property name and deserializes it as a long.
public long GetLong(string name)
Parameters
namestringThe property name of the value to get.
Returns
- long
The deserialized long value.
GetString(string)
Gets the value associated with the specified property name and deserializes it as a string.
public string? GetString(string name)
Parameters
namestringThe property name of the value to get.
Returns
- string
The deserialized string value, or
nullif not found.
GetStrings(string)
Gets the value associated with the specified property name and deserializes it as a array of string.
public string[]? GetStrings(string name)
Parameters
namestringThe property name of the value to get.
Returns
- string[]
The deserialized string value, or
nullif not found.