Class TypeMismatchException
An exception thrown when an object of the wrong type is added to a collection or assigned to a property.
Implements
Inherited Members
Namespace: OpenCollar.Extensions.Configuration
Assembly: OpenCollar.Extensions.Configuration.dll
Syntax
[Serializable]
public class TypeMismatchException : ConfigurationException, 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 SourceTypeMismatchException(IConfigurationRoot)
Initializes a new instance of the TypeMismatchException class.
Declaration
public TypeMismatchException(IConfigurationRoot configuration)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Configuration.IConfigurationRoot | configuration | The configuration service from which data was being read. |
TypeMismatchException(IConfigurationRoot, String)
Initializes a new instance of the TypeMismatchException class.
Declaration
public TypeMismatchException(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. |
TypeMismatchException(IConfigurationRoot, String, Exception)
Initializes a new instance of the TypeMismatchException class.
Declaration
public TypeMismatchException(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. |
TypeMismatchException(IConfigurationRoot, String, String)
Initializes a new instance of the TypeMismatchException class.
Declaration
public TypeMismatchException(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. |
TypeMismatchException(IConfigurationRoot, String, String, Exception)
Initializes a new instance of the TypeMismatchException class.
Declaration
public TypeMismatchException(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. |
TypeMismatchException(SerializationInfo, StreamingContext)
Initializes a new instance of the TypeMismatchException class.
Declaration
protected TypeMismatchException(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. |