Show / Hide Table of Contents

    Class ConfigurationException

    An exception thrown when an error occurs during the reading or writing of configuration.

    Inheritance
    System.Object
    System.Exception
    ConfigurationException
    TypeMismatchException
    Implements
    System.Runtime.Serialization.ISerializable
    Namespace: OpenCollar.Extensions.Configuration
    Assembly: OpenCollar.Extensions.Configuration.dll
    Syntax
    [Serializable]
    public class ConfigurationException : Exception, ISerializable
    Remarks

    Use the ConfigurationPath property to discover the path to the configuration item concerned.

    The following UML has been generated directly from the source code using Jebbs PlantUML .

    Constructors

    | Improve this Doc View Source

    ConfigurationException(IConfigurationRoot)

    Initializes a new instance of the ConfigurationException class.

    Declaration
    public ConfigurationException(IConfigurationRoot configuration)
    Parameters
    Type Name Description
    Microsoft.Extensions.Configuration.IConfigurationRoot configuration

    The configuration service from which data was being read.

    | Improve this Doc View Source

    ConfigurationException(IConfigurationRoot, String)

    Initializes a new instance of the ConfigurationException class.

    Declaration
    public ConfigurationException(IConfigurationRoot configuration, string message)
    Parameters
    Type Name Description
    Microsoft.Extensions.Configuration.IConfigurationRoot configuration

    The configuration service from which data was being read.

    System.String message

    The message that describes the error.

    | Improve this Doc View Source

    ConfigurationException(IConfigurationRoot, String, Exception)

    Initializes a new instance of the ConfigurationException class.

    Declaration
    public ConfigurationException(IConfigurationRoot configuration, string message, Exception innerException)
    Parameters
    Type Name Description
    Microsoft.Extensions.Configuration.IConfigurationRoot configuration

    The configuration service from which data was being read.

    System.String message

    The error message that explains the reason for the exception.

    System.Exception innerException

    The exception that is the cause of the current exception, or null if no inner exception is specified.

    | Improve this Doc View Source

    ConfigurationException(IConfigurationRoot, String, String)

    Initializes a new instance of the ConfigurationException class.

    Declaration
    public ConfigurationException(IConfigurationRoot configuration, string configurationPath, string message)
    Parameters
    Type Name Description
    Microsoft.Extensions.Configuration.IConfigurationRoot configuration

    The configuration service from which data was being read.

    System.String configurationPath

    The path to the configuration affected.

    System.String message

    The message that describes the error.

    | Improve this Doc View Source

    ConfigurationException(IConfigurationRoot, String, String, Exception)

    Initializes a new instance of the ConfigurationException class.

    Declaration
    public ConfigurationException(IConfigurationRoot configuration, string configurationPath, string message, Exception innerException)
    Parameters
    Type Name Description
    Microsoft.Extensions.Configuration.IConfigurationRoot configuration

    The configuration service from which data was being read.

    System.String configurationPath

    The path to the configuration affected.

    System.String message

    The error message that explains the reason for the exception.

    System.Exception innerException

    The exception that is the cause of the current exception, or null if no inner exception is specified.

    | Improve this Doc View Source

    ConfigurationException(SerializationInfo, StreamingContext)

    Initializes a new instance of the ConfigurationException class.

    Declaration
    protected ConfigurationException(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    The System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.

    System.Runtime.Serialization.StreamingContext context

    The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.

    Properties

    | Improve this Doc View Source

    ConfigurationPath

    Gets or sets the path to the configuration affected.

    Declaration
    public string ConfigurationPath { get; set; }
    Property Value
    Type Description
    System.String

    The path to the configuration affected.

    | Improve this Doc View Source

    LoadedConfiguration

    Gets or sets the details of the loaded configuration providers at the time of the error.

    Declaration
    public string LoadedConfiguration { get; set; }
    Property Value
    Type Description
    System.String

    The details of the loaded configuration providers at the time of the error.

    Methods

    | Improve this Doc View Source

    GetObjectData(SerializationInfo, StreamingContext)

    When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception.

    Declaration
    public override void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    The System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.

    System.Runtime.Serialization.StreamingContext context

    The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.

    Overrides
    System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
    Exceptions
    Type Condition
    System.ArgumentNullException

    info is null.

    Implements

    System.Runtime.Serialization.ISerializable

    See Also

    System.Exception
    • Improve this Doc
    • View Source
    Back to top
    Copyright © 2019-2020 Jonathan Evans
    Version: 0.2.232