System.ComponentModel.TypeDescriptor.TypeDescriptionNode.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 && !objectType.GetTypeInfo().IsInstanceOfType(instance))
                {
                    throw new ArgumentException(nameof(instance));
                }

                return new DefaultTypeDescriptor(this, objectType, instance);
            }