Internet Address List ConverterIs Valid(IType Descriptor Context, Object) Method
Definition
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
public override bool IsValid(
ITypeDescriptorContext? context,
Object? value
)Parameters
- context ITypeDescriptorContext
- An ITypeDescriptorContext that provides a format context.
- value Object
- The Object to test for validity.
Return Value
Booleanif the specified value is valid for this object; otherwise, .
Remarks
Use the context parameter to extract additional information about the environment from which this converter is invoked. This parameter can be , so always check it. Also, properties on the context object can return .
Starting in .NET Framework 4, the IsValid(ITypeDescriptorContext, Object) method catches exceptions from the CanConvertFrom(ITypeDescriptorContext, Type) and ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) methods. If the input value type causes CanConvertFrom(ITypeDescriptorContext, Type) to return , or if the input value causes ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) to raise an exception, the IsValid(ITypeDescriptorContext, Object) method returns .