Class ConfigurationFactory
This class contains methods used to retrieve configuration information from a variety of sources including user-supplied strings, configuration files and assembly resources.
Inherited Members
Namespace: Akka.Configuration
Assembly: Akka.dll
Syntax
public class ConfigurationFactory
Properties
| Edit this page View SourceEmpty
Generates an empty configuration.
Declaration
public static Config Empty { get; }
Property Value
Type | Description |
---|---|
Config |
Methods
| Edit this page View SourceDefault()
Retrieves the default configuration that Akka.NET uses when no configuration has been defined.
Declaration
public static Config Default()
Returns
Type | Description |
---|---|
Config | The configuration that contains default values for all options. |
FromObject(object)
Creates a configuration based on the supplied source object
Declaration
public static Config FromObject(object source)
Parameters
Type | Name | Description |
---|---|---|
object | source | The source object |
Returns
Type | Description |
---|---|
Config | The configuration created from the source object |
FromResource(string, object)
Retrieves a configuration defined in a resource of the assembly containing the supplied instance object.
Declaration
public static Config FromResource(string resourceName, object instanceInAssembly)
Parameters
Type | Name | Description |
---|---|---|
string | resourceName | The name of the resource that contains the configuration. |
object | instanceInAssembly | An instance object located in the assembly to search. |
Returns
Type | Description |
---|---|
Config | The configuration defined in the assembly that contains the instanced object. |
FromResource(string, Assembly)
Retrieves a configuration defined in a resource of the supplied assembly.
Declaration
public static Config FromResource(string resourceName, Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
string | resourceName | The name of the resource that contains the configuration. |
Assembly | assembly | The assembly that contains the given resource. |
Returns
Type | Description |
---|---|
Config | The configuration defined in the assembly that contains the given resource. |
FromResource<TAssembly>(string)
Retrieves a configuration defined in a resource of the assembly
containing the supplied type TAssembly
.
Declaration
public static Config FromResource<TAssembly>(string resourceName)
Parameters
Type | Name | Description |
---|---|---|
string | resourceName | The name of the resource that contains the configuration. |
Returns
Type | Description |
---|---|
Config | The configuration defined in the assembly that contains the type |
Type Parameters
Name | Description |
---|---|
TAssembly | A type located in the assembly to search. |
Load()
Loads a configuration defined in the current application's configuration file, e.g. app.config or web.config
Declaration
public static Config Load()
Returns
Type | Description |
---|---|
Config | The configuration defined in the configuration file. |
ParseString(string)
Generates a configuration defined in the supplied HOCON (Human-Optimized Config Object Notation) string.
Declaration
public static Config ParseString(string hocon)
Parameters
Type | Name | Description |
---|---|---|
string | hocon | A string that contains configuration options to use. |
Returns
Type | Description |
---|---|
Config | The configuration defined in the supplied HOCON string. |
ParseString(string, Func<string, HoconRoot>)
Generates a configuration defined in the supplied HOCON (Human-Optimized Config Object Notation) string.
Declaration
public static Config ParseString(string hocon, Func<string, HoconRoot> includeCallback)
Parameters
Type | Name | Description |
---|---|---|
string | hocon | A string that contains configuration options to use. |
Func<string, HoconRoot> | includeCallback | callback used to resolve includes |
Returns
Type | Description |
---|---|
Config | The configuration defined in the supplied HOCON string. |