Search Results for

    Show / Hide Table of Contents

    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
        }
      }
    }
    Inheritance
    object
    HoconObject
    Implements
    IHoconElement
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Akka.Configuration.Hocon
    Assembly: Akka.dll
    Syntax
    public class HoconObject : IHoconElement

    Constructors

    | Edit this page View Source

    HoconObject()

    Initializes a new instance of the HoconObject class.

    Declaration
    public HoconObject()

    Properties

    | Edit this page View Source

    Items

    Retrieves the underlying map that this element is based on.

    Declaration
    public Dictionary<string, HoconValue> Items { get; }
    Property Value
    Type Description
    Dictionary<string, HoconValue>
    | Edit this page View Source

    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

    | Edit this page View Source

    GetArray()

    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.

    | Edit this page View Source

    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.

    | Edit this page View Source

    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.

    | Edit this page View Source

    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.

    | Edit this page View Source

    IsArray()

    Determines whether this element is an array.

    Declaration
    public bool IsArray()
    Returns
    Type Description
    bool

    false

    | Edit this page View Source

    IsString()

    Determines whether this element is a string.

    Declaration
    public bool IsString()
    Returns
    Type Description
    bool

    false

    | Edit this page View Source

    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.

    | Edit this page View Source

    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
    object.ToString()
    | Edit this page View Source

    ToString(int)

    Returns a HOCON string representation of this element.

    Declaration
    public string ToString(int indent)
    Parameters
    Type Name Description
    int indent

    The number of spaces to indent the string.

    Returns
    Type Description
    string

    A HOCON string representation of this element.

    Implements

    IHoconElement

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET