System.ComponentModel.TypeDescriptor.ComNativeDescriptionProvider.GetTypeDescriptor C# (CSharp) Method

GetTypeDescriptor() private method

private GetTypeDescriptor ( Type objectType, object instance ) : ICustomTypeDescriptor
objectType System.Type
instance object
return ICustomTypeDescriptor
            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);
            }
TypeDescriptor.ComNativeDescriptionProvider