Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    ConfigurationFactory
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Configuration
    Assembly: Akka.dll
    Syntax
    public class ConfigurationFactory

    Properties

    | Edit this page View Source

    Empty

    Generates an empty configuration.

    Declaration
    public static Config Empty { get; }
    Property Value
    Type Description
    Config

    Methods

    | Edit this page View Source

    Default()

    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.

    | Edit this page View Source

    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

    | Edit this page View Source

    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.

    | Edit this page View Source

    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.

    | Edit this page View Source

    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 TAssembly.

    Type Parameters
    Name Description
    TAssembly

    A type located in the assembly to search.

    | Edit this page View Source

    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.

    | Edit this page View Source

    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.

    | Edit this page View Source

    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.

    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