System.ComponentModel.ReflectPropertyDescriptor.ReflectPropertyDescriptor C# (CSharp) Method

ReflectPropertyDescriptor() public method

The main constructor for ReflectPropertyDescriptors.
public ReflectPropertyDescriptor ( Type componentClass, string name, Type type, Attribute attributes ) : System.Collections
componentClass Type
name string
type Type
attributes Attribute
return System.Collections
        public ReflectPropertyDescriptor(Type componentClass, string name, Type type,
                                         Attribute[] attributes)
        : base(name, attributes)
        {
            Debug.WriteLine($"Creating ReflectPropertyDescriptor for {componentClass?.FullName}.{name}");

            try
            {
                if (type == null)
                {
                    Debug.WriteLine("type == null, name == " + name);
                    throw new ArgumentException(string.Format(SR.ErrorInvalidPropertyType, name));
                }
                if (componentClass == null)
                {
                    Debug.WriteLine("componentClass == null, name == " + name);
                    throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(componentClass)));
                }
                _type = type;
                _componentClass = componentClass;
            }
            catch (Exception t)
            {
                Debug.Fail("Property '" + name + "' on component " + componentClass.FullName + " failed to init.");
                Debug.Fail(t.ToString());
                throw;
            }
        }

Same methods

ReflectPropertyDescriptor::ReflectPropertyDescriptor ( Type componentClass, PropertyDescriptor oldReflectPropertyDescriptor, Attribute attributes ) : System.Collections
ReflectPropertyDescriptor::ReflectPropertyDescriptor ( Type componentClass, string name, Type type, PropertyInfo propInfo, MethodInfo getMethod, MethodInfo setMethod, Attribute attrs ) : System.Collections
ReflectPropertyDescriptor::ReflectPropertyDescriptor ( Type componentClass, string name, Type type, Type receiverType, MethodInfo getMethod, MethodInfo setMethod, Attribute attrs ) : System.Collections