C# Class Akka.Configuration.Hocon.HoconValue

This class represents the root type for a HOCON (Human-Optimized Config Object Notation) configuration object.
Inheritance: IMightBeAHoconObject
显示文件 Open project: rogeralsing/akka.net Class Usage Examples

Public Methods

Method Description
AppendValue ( IHoconElement value ) : void

Adds the given element to the list of elements inside this HoconValue.

AtKey ( string key ) : Config

Wraps this HoconValue into a new Config object at the specified key.

Clear ( ) : void

Clears the list of elements inside this HoconValue.

GetArray ( ) : IList

Retrieves a list of values from this HoconValue.

GetBoolean ( ) : bool

Retrieves the boolean value from this HoconValue.

GetBooleanList ( ) : IList

Retrieves a list of boolean values from this HoconValue.

GetByte ( ) : byte

Retrieves the byte value from this HoconValue.

GetByteList ( ) : IList

Retrieves a list of byte values from this HoconValue.

GetByteSize ( ) : long?

Retrieves the long value, optionally suffixed with a 'b', from this HoconValue.

GetChildObject ( string key ) : HoconValue

Retrieves the child object located at the given key.

GetDecimal ( ) : decimal

Retrieves the decimal value from this HoconValue.

GetDecimalList ( ) : IList

Retrieves a list of decimal values from this HoconValue.

GetDouble ( ) : double

Retrieves the double value from this HoconValue.

GetDoubleList ( ) : IList

Retrieves a list of double values from this HoconValue.

GetFloat ( ) : float

Retrieves the float value from this HoconValue.

GetFloatList ( ) : IList

Retrieves a list of float values from this HoconValue.

GetInt ( ) : int

Retrieves the integer value from this HoconValue.

GetIntList ( ) : IList

Retrieves a list of integer values from this HoconValue.

GetLong ( ) : long

Retrieves the long value from this HoconValue.

GetLongList ( ) : IList

Retrieves a list of long values from this HoconValue.

GetObject ( ) : HoconObject

Retrieves the HoconObject from this HoconValue.

GetString ( ) : string

Retrieves the string value from this HoconValue.

GetStringList ( ) : IList

Retrieves a list of string values from this HoconValue.

GetTimeSpan ( bool allowInfinite = true ) : System.TimeSpan

Retrieves the time span value from this HoconValue.

HoconValue ( ) : System

Initializes a new instance of the HoconValue class.

IsArray ( ) : bool

Determines whether this HoconValue is an array.

IsObject ( ) : bool

Determines if this HoconValue is a HoconObject.

IsString ( ) : bool

Determines whether all the elements inside this HoconValue are a string.

NewValue ( IHoconElement value ) : void

Creates a fresh list of elements inside this HoconValue and adds the given value to the list.

ToString ( ) : string

Returns a HOCON string representation of this HoconValue.

ToString ( int indent ) : string

Returns a HOCON string representation of this HoconValue.

Private Methods

Method Description
ConcatString ( ) : string
GetMillisDuration ( bool allowInfinite = true ) : System.TimeSpan
ParsePositiveValue ( string v ) : double
QuoteIfNeeded ( string text ) : string

Method Details

AppendValue() public method

Adds the given element to the list of elements inside this HoconValue.
public AppendValue ( IHoconElement value ) : void
value IHoconElement The element to add to the list.
return void

AtKey() public method

Wraps this HoconValue into a new Config object at the specified key.
public AtKey ( string key ) : Config
key string The key designated to be the new root element.
return Config

Clear() public method

Clears the list of elements inside this HoconValue.
public Clear ( ) : void
return void

GetArray() public method

Retrieves a list of values from this HoconValue.
public GetArray ( ) : IList
return IList

GetBoolean() public method

Retrieves the boolean value from this HoconValue.
/// This exception occurs when the doesn't /// conform to the standard boolean values: "on", "off", "true", or "false" ///
public GetBoolean ( ) : bool
return bool

GetBooleanList() public method

Retrieves a list of boolean values from this HoconValue.
public GetBooleanList ( ) : IList
return IList

GetByte() public method

Retrieves the byte value from this HoconValue.
public GetByte ( ) : byte
return byte

GetByteList() public method

Retrieves a list of byte values from this HoconValue.
public GetByteList ( ) : IList
return IList

GetByteSize() public method

Retrieves the long value, optionally suffixed with a 'b', from this HoconValue.
public GetByteSize ( ) : long?
return long?

GetChildObject() public method

Retrieves the child object located at the given key.
public GetChildObject ( string key ) : HoconValue
key string The key used to retrieve the child object.
return HoconValue

GetDecimal() public method

Retrieves the decimal value from this HoconValue.
public GetDecimal ( ) : decimal
return decimal

GetDecimalList() public method

Retrieves a list of decimal values from this HoconValue.
public GetDecimalList ( ) : IList
return IList

GetDouble() public method

Retrieves the double value from this HoconValue.
public GetDouble ( ) : double
return double

GetDoubleList() public method

Retrieves a list of double values from this HoconValue.
public GetDoubleList ( ) : IList
return IList

GetFloat() public method

Retrieves the float value from this HoconValue.
public GetFloat ( ) : float
return float

GetFloatList() public method

Retrieves a list of float values from this HoconValue.
public GetFloatList ( ) : IList
return IList

GetInt() public method

Retrieves the integer value from this HoconValue.
public GetInt ( ) : int
return int

GetIntList() public method

Retrieves a list of integer values from this HoconValue.
public GetIntList ( ) : IList
return IList

GetLong() public method

Retrieves the long value from this HoconValue.
public GetLong ( ) : long
return long

GetLongList() public method

Retrieves a list of long values from this HoconValue.
public GetLongList ( ) : IList
return IList

GetObject() public method

Retrieves the HoconObject from this HoconValue.
public GetObject ( ) : HoconObject
return HoconObject

GetString() public method

Retrieves the string value from this HoconValue.
public GetString ( ) : string
return string

GetStringList() public method

Retrieves a list of string values from this HoconValue.
public GetStringList ( ) : IList
return IList

GetTimeSpan() public method

Retrieves the time span value from this HoconValue.
public GetTimeSpan ( bool allowInfinite = true ) : System.TimeSpan
allowInfinite bool A flag used to set inifinite durations.
return System.TimeSpan

HoconValue() public method

Initializes a new instance of the HoconValue class.
public HoconValue ( ) : System
return System

IsArray() public method

Determines whether this HoconValue is an array.
public IsArray ( ) : bool
return bool

IsObject() public method

Determines if this HoconValue is a HoconObject.
public IsObject ( ) : bool
return bool

IsString() public method

Determines whether all the elements inside this HoconValue are a string.
public IsString ( ) : bool
return bool

NewValue() public method

Creates a fresh list of elements inside this HoconValue and adds the given value to the list.
public NewValue ( IHoconElement value ) : void
value IHoconElement The element to add to the list.
return void

ToString() public method

Returns a HOCON string representation of this HoconValue.
public ToString ( ) : string
return string

ToString() public method

Returns a HOCON string representation of this HoconValue.
public ToString ( int indent ) : string
indent int The number of spaces to indent the string.
return string