Class HoconObject
This class represents an object element in a HOCON (Human-Optimized Config Object Notation) configuration string.
akka {
actor {
debug {
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}
}
}
Implements
Inherited Members
Namespace: Akka.Configuration.Hocon
Assembly: Akka.dll
Syntax
public class HoconObject : IHoconElement
Constructors
| Improve this Doc View SourceHoconObject()
Initializes a new instance of the HoconObject class.
Declaration
public HoconObject()
Properties
| Improve this Doc View SourceItems
Retrieves the underlying map that this element is based on.
Declaration
public Dictionary<string, HoconValue> Items { get; }
Property Value
Type | Description |
---|---|
Dictionary<String, HoconValue> |
Unwrapped
Retrieves the underlying map that contains the barebones object values.
Declaration
[JsonIgnore]
public IDictionary<string, object> Unwrapped { get; }
Property Value
Type | Description |
---|---|
IDictionary<String, Object> |
Methods
| Improve this Doc View SourceGetArray()
N/A
Declaration
public IList<HoconValue> GetArray()
Returns
Type | Description |
---|---|
IList<HoconValue> | N/A |
Exceptions
Type | Condition |
---|---|
NotImplementedException | This exception is thrown automatically since this element is an object and not an array. |
GetKey(String)
Retrieves the value associated with the supplied key.
Declaration
public HoconValue GetKey(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key associated with the value to retrieve. |
Returns
Type | Description |
---|---|
HoconValue | The value associated with the supplied key or null if they key does not exist. |
GetOrCreateKey(String)
Retrieves the value associated with the supplied key. If the supplied key is not found, then one is created with a blank value.
Declaration
public HoconValue GetOrCreateKey(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key associated with the value to retrieve. |
Returns
Type | Description |
---|---|
HoconValue | The value associated with the supplied key. |
GetString()
N/A
Declaration
public string GetString()
Returns
Type | Description |
---|---|
String | N/A |
Exceptions
Type | Condition |
---|---|
NotImplementedException | This exception is thrown automatically since this element is an object and not a string. |
IsArray()
Determines whether this element is an array.
Declaration
public bool IsArray()
Returns
Type | Description |
---|---|
Boolean |
|
IsString()
Determines whether this element is a string.
Declaration
public bool IsString()
Returns
Type | Description |
---|---|
Boolean |
|
Merge(HoconObject)
Merges the specified object into this instance.
Declaration
public void Merge(HoconObject other)
Parameters
Type | Name | Description |
---|---|---|
HoconObject | other | The object to merge into this instance. |
ToString()
Returns a HOCON string representation of this element.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A HOCON string representation of this element. |
Overrides
| Improve this Doc View SourceToString(Int32)
Returns a HOCON string representation of this element.
Declaration
public string ToString(int indent)
Parameters
Type | Name | Description |
---|---|---|
Int32 | indent | The number of spaces to indent the string. |
Returns
Type | Description |
---|---|
String | A HOCON string representation of this element. |