/// <summary>Initializes a new instance of the <see cref="BaseClassNotImmutableException"/> class.</summary> /// <param name="baseType">The base <see cref="Type"/> that was not immutable.</param> /// <param name="derivedType">The derived <see cref="Type"/></param> /// <param name="innerException"><see cref="NotImmutableException"/> that caused derived type not to be immutable.</param> internal BaseClassNotImmutableException(Type baseType, Type derivedType, NotImmutableException innerException) : base($"Type {derivedType.FullName} because base inherited base class {baseType.FullName} was not immutable.", innerException) { }
/// <summary>Initializes a new instance of the <see cref="InstancePropertyValueNotImmutableException"/> class.</summary> /// <param name="propertyInfo">The property that caused the exception.</param> /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param> internal InstancePropertyValueNotImmutableException(PropertyInfo propertyInfo, NotImmutableException innerException) : base($"Instance of type {propertyInfo.DeclaringType.FullName} property {propertyInfo.Name} is mutable.", innerException) { }
/// <summary>Initializes a new instance of the <see cref="TypeFieldNotImmutableException"/> class.</summary> /// <param name="fieldInfo">Field of that coused the not immutable exception.</param> /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param> internal TypeFieldNotImmutableException(FieldInfo fieldInfo, NotImmutableException innerException) : base($"Field: {fieldInfo.Name}, Type: {fieldInfo.DeclaringType.FullName}", innerException) { }
/// <summary>Initializes a new instance of the <see cref="TypePropertyNotImmutableException"/> class.</summary> /// <param name="propertyInfo">The proprtety that coused the nor immutable exception.</param> /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param> internal TypePropertyNotImmutableException(PropertyInfo propertyInfo, NotImmutableException innerException) : base($"Property: {propertyInfo.Name}, Type: {propertyInfo.DeclaringType.FullName}", innerException) { }
/// <summary>Initializes a new instance of the <see cref="InstanceFieldValueNotImmutableException"/> class.</summary> /// <param name="fieldInfo">Field of that coused the not immutable exception.</param> /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param> internal InstanceFieldValueNotImmutableException(FieldInfo fieldInfo, NotImmutableException innerException) : base($"Instance of type {fieldInfo.DeclaringType.FullName} field {fieldInfo.Name} is mutable.", innerException) { }