Microsoft.VisualStudio.Project.DesignPropertyDescriptor.DesignPropertyDescriptor C# (CSharp) Method

DesignPropertyDescriptor() public method

Constructor. Copy the base property descriptor and also hold a pointer to it for calling its overridden abstract methods.
public DesignPropertyDescriptor ( PropertyDescriptor prop, ProjectNode projectManager ) : System
prop System.ComponentModel.PropertyDescriptor
projectManager ProjectNode
return System
        public DesignPropertyDescriptor(PropertyDescriptor prop, ProjectNode projectManager)
            : base(prop)
        {
            if (prop == null)
                throw new ArgumentNullException("prop");
            if (projectManager == null)
                throw new ArgumentNullException("projectManager");

            this._projectManager = projectManager;
            this.property = prop;

            DisplayNameAttribute attr = prop.Attributes[typeof(DisplayNameAttribute)] as DisplayNameAttribute;

            if(attr != null)
            {
                this.displayName = attr.DisplayName;
            }
            else
            {
                this.displayName = prop.Name;
            }
        }