Class Parser
This class contains methods used to parse HOCON (Human-Optimized Config Object Notation) configuration strings.
Inherited Members
Namespace: Akka.Configuration.Hocon
Assembly: Akka.dll
Syntax
public class Parser
Methods
| Improve this Doc View SourceParse(String, Func<String, HoconRoot>)
Parses the supplied HOCON configuration string into a root element.
Declaration
public static HoconRoot Parse(string text, Func<string, HoconRoot> includeCallback)
Parameters
Type | Name | Description |
---|---|---|
String | text | The string that contains a HOCON configuration string. |
Func<String, HoconRoot> | includeCallback | Callback used to resolve includes |
Returns
Type | Description |
---|---|
HoconRoot | The root element created from the supplied HOCON configuration string. |
Exceptions
Type | Condition |
---|---|
FormatException | This exception is thrown if an unresolved substitution or an unknown token is encountered. |
Exception | This exception is thrown if the end of the file has been reached while trying to read a value. |
ParseArray(String)
Retrieves the next array token from the tokenizer.
Declaration
public HoconArray ParseArray(string currentPath)
Parameters
Type | Name | Description |
---|---|---|
String | currentPath | The location in the HOCON object hierarchy that the parser is currently reading. |
Returns
Type | Description |
---|---|
HoconArray | An array of elements retrieved from the token. |
ParseValue(HoconValue, String)
Retrieves the next value token from the tokenizer and appends it
to the supplied element owner
.
Declaration
public void ParseValue(HoconValue owner, string currentPath)
Parameters
Type | Name | Description |
---|---|---|
HoconValue | owner | The element to append the next token. |
String | currentPath | The location in the HOCON object hierarchy that the parser is currently reading. |
Exceptions
Type | Condition |
---|---|
Exception | This exception is thrown if the end of the file has been reached while trying to read a value. |