C# Class Akka.Configuration.Config

显示文件 Open project: rogeralsing/akka.net Class Usage Examples

Public Properties

Property Type Description
Empty Config

Public Methods

Method Description
AsEnumerable ( ) : HoconValue>>.IEnumerable

Retrieves an enumerable key value pair representation of the current configuration.

Config ( ) : System

Initializes a new instance of the Config class.

Config ( Config source, Config fallback ) : System

Initializes a new instance of the Config class.

Config ( Akka.Configuration.Hocon.HoconRoot root ) : System

Initializes a new instance of the Config class.

GetBoolean ( string path, bool @default = false ) : bool

Retrieves a boolean value from the specified path in the configuration.

GetBooleanList ( string path ) : IList

Retrieves a list of boolean values from the specified path in the configuration.

GetByteList ( string path ) : IList

Retrieves a list of byte values from the specified path in the configuration.

GetByteSize ( string path ) : long?

Retrieves a long value, optionally suffixed with a 'b', from the specified path in the configuration.

GetConfig ( string path ) : Config

Retrieves a new configuration from the current configuration with the root node being the supplied path.

GetDecimal ( string path, decimal @default ) : decimal

Retrieves a decimal value from the specified path in the configuration.

GetDecimalList ( string path ) : IList

Retrieves a list of decimal values from the specified path in the configuration.

GetDouble ( string path, double @default ) : double

Retrieves a double value from the specified path in the configuration.

GetDoubleList ( string path ) : IList

Retrieves a list of double values from the specified path in the configuration.

GetFloat ( string path, float @default ) : float

Retrieves a float value from the specified path in the configuration.

GetFloatList ( string path ) : IList

Retrieves a list of float values from the specified path in the configuration.

GetInt ( string path, int @default ) : int

Retrieves an integer value from the specified path in the configuration.

GetIntList ( string path ) : IList

Retrieves a list of int values from the specified path in the configuration.

GetLong ( string path, long @default ) : long

Retrieves a long value from the specified path in the configuration.

GetLongList ( string path ) : IList

Retrieves a list of long values from the specified path in the configuration.

GetString ( string path, string @default = null ) : string

Retrieves a string value from the specified path in the configuration.

GetStringList ( string path ) : IList

Retrieves a list of string values from the specified path in the configuration.

GetTimeSpan ( string path, System.TimeSpan @default = null, bool allowInfinite = true ) : System.TimeSpan

Retrieves a TimeSpan value from the specified path in the configuration.

GetValue ( string path ) : HoconValue

Retrieves a HoconValue from a specific path.

HasPath ( string path ) : bool

Determine if a HOCON configuration element exists at the specified location

ToString ( ) : string

Converts the current configuration to a string.

ToString ( bool includeFallback ) : string

Converts the current configuration to a string

WithFallback ( Config fallback ) : Config

Configure the current configuration with a secondary source.

operator ( ) : Config

Adds the supplied configuration string as a fallback to the supplied configuration.

Protected Methods

Method Description
Copy ( ) : Config

Generates a deep clone of the current configuration.

Private Methods

Method Description
GetMillisDuration ( string path, System.TimeSpan @default = null, bool allowInfinite = true ) : System.TimeSpan
GetNode ( string path ) : HoconValue

Method Details

AsEnumerable() public method

Retrieves an enumerable key value pair representation of the current configuration.
public AsEnumerable ( ) : HoconValue>>.IEnumerable
return HoconValue>>.IEnumerable

Config() public method

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

Config() public method

Initializes a new instance of the Config class.
The source configuration cannot be null.
public Config ( Config source, Config fallback ) : System
source Config The configuration to use as the primary source.
fallback Config The configuration to use as a secondary source.
return System

Config() public method

Initializes a new instance of the Config class.
"The root value cannot be null."
public Config ( Akka.Configuration.Hocon.HoconRoot root ) : System
root Akka.Configuration.Hocon.HoconRoot The root node to base this configuration.
return System

Copy() protected method

Generates a deep clone of the current configuration.
protected Copy ( ) : Config
return Config

GetBoolean() public method

Retrieves a boolean value from the specified path in the configuration.
public GetBoolean ( string path, bool @default = false ) : bool
path string The path that contains the value to retrieve.
@default bool
return bool

GetBooleanList() public method

Retrieves a list of boolean values from the specified path in the configuration.
public GetBooleanList ( string path ) : IList
path string The path that contains the values to retrieve.
return IList

GetByteList() public method

Retrieves a list of byte values from the specified path in the configuration.
public GetByteList ( string path ) : IList
path string The path that contains the values to retrieve.
return IList

GetByteSize() public method

Retrieves a long value, optionally suffixed with a 'b', from the specified path in the configuration.
public GetByteSize ( string path ) : long?
path string The path that contains the value to retrieve.
return long?

GetConfig() public method

Retrieves a new configuration from the current configuration with the root node being the supplied path.
public GetConfig ( string path ) : Config
path string The path that contains the configuration to retrieve.
return Config

GetDecimal() public method

Retrieves a decimal value from the specified path in the configuration.
public GetDecimal ( string path, decimal @default ) : decimal
path string The path that contains the value to retrieve.
@default decimal
return decimal

GetDecimalList() public method

Retrieves a list of decimal values from the specified path in the configuration.
public GetDecimalList ( string path ) : IList
path string The path that contains the values to retrieve.
return IList

GetDouble() public method

Retrieves a double value from the specified path in the configuration.
public GetDouble ( string path, double @default ) : double
path string The path that contains the value to retrieve.
@default double
return double

GetDoubleList() public method

Retrieves a list of double values from the specified path in the configuration.
public GetDoubleList ( string path ) : IList
path string The path that contains the values to retrieve.
return IList

GetFloat() public method

Retrieves a float value from the specified path in the configuration.
public GetFloat ( string path, float @default ) : float
path string The path that contains the value to retrieve.
@default float
return float

GetFloatList() public method

Retrieves a list of float values from the specified path in the configuration.
public GetFloatList ( string path ) : IList
path string The path that contains the values to retrieve.
return IList

GetInt() public method

Retrieves an integer value from the specified path in the configuration.
public GetInt ( string path, int @default ) : int
path string The path that contains the value to retrieve.
@default int
return int

GetIntList() public method

Retrieves a list of int values from the specified path in the configuration.
public GetIntList ( string path ) : IList
path string The path that contains the values to retrieve.
return IList

GetLong() public method

Retrieves a long value from the specified path in the configuration.
public GetLong ( string path, long @default ) : long
path string The path that contains the value to retrieve.
@default long
return long

GetLongList() public method

Retrieves a list of long values from the specified path in the configuration.
public GetLongList ( string path ) : IList
path string The path that contains the values to retrieve.
return IList

GetString() public method

Retrieves a string value from the specified path in the configuration.
public GetString ( string path, string @default = null ) : string
path string The path that contains the value to retrieve.
@default string
return string

GetStringList() public method

Retrieves a list of string values from the specified path in the configuration.
public GetStringList ( string path ) : IList
path string The path that contains the values to retrieve.
return IList

GetTimeSpan() public method

Retrieves a TimeSpan value from the specified path in the configuration.
public GetTimeSpan ( string path, System.TimeSpan @default = null, bool allowInfinite = true ) : System.TimeSpan
path string The path that contains the value to retrieve.
@default System.TimeSpan
allowInfinite bool true if infinite timespans are allowed; otherwise false.
return System.TimeSpan

GetValue() public method

Retrieves a HoconValue from a specific path.
public GetValue ( string path ) : HoconValue
path string The path that contains the value to retrieve.
return Akka.Configuration.Hocon.HoconValue

HasPath() public method

Determine if a HOCON configuration element exists at the specified location
public HasPath ( string path ) : bool
path string The location to check for a configuration value.
return bool

ToString() public method

Converts the current configuration to a string.
public ToString ( ) : string
return string

ToString() public method

Converts the current configuration to a string
public ToString ( bool includeFallback ) : string
includeFallback bool if true returns string with current config combined with fallback key-values else only current config key-values
return string

WithFallback() public method

Configure the current configuration with a secondary source.
Config can not have itself as fallback.
public WithFallback ( Config fallback ) : Config
fallback Config The configuration to use as a secondary source.
return Config

operator() public static method

Adds the supplied configuration string as a fallback to the supplied configuration.
public static operator ( ) : Config
return Config

Property Details

Empty public_oe static_oe property

A static "Empty" configuration we can use instead of null in some key areas.
public static Config,Akka.Configuration Empty
return Config