public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance)
{
if (objectType == null)
{
throw new ArgumentNullException(nameof(objectType));
}
if (instance == null)
{
return null;
}
if (!objectType.IsInstanceOfType(instance))
{
throw new ArgumentException(SR.Format(SR.ConvertToException, nameof(objectType), instance.GetType()) , nameof(instance));
}
return new ComNativeTypeDescriptor(Handler, instance);
}