protected override PropertyDescriptor OnProcessProperty(PropertyDescriptor p)
 {
     if (string.CompareOrdinal(p.Name, "OutputType") == 0)
     {
         ISingleAction av = this.ActionObject as ISingleAction;
         if (av != null && av.ActionData != null && av.ActionData.ActionMethod != null)
         {
             GetterClass gc = av.ActionData.ActionMethod as GetterClass;
             if (gc != null)
             {
                 PropertyDescriptor p0 = new ReadOnlyPropertyDesc(p);
                 return(p0);
             }
             else
             {
                 SetterClass sc = av.ActionData.ActionMethod as SetterClass;
                 if (sc != null)
                 {
                     PropertyDescriptor p0 = new ReadOnlyPropertyDesc(p);
                     return(p0);
                 }
             }
         }
     }
     return(p);
 }
        public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
        {
            PropertyDescriptorCollection ps = TypeDescriptor.GetProperties(this, attributes, true);

            if (VPLUtil.GetBrowseableProperties(attributes))
            {
                List <PropertyDescriptor> list = new List <PropertyDescriptor>();
                foreach (PropertyDescriptor p in ps)
                {
                    if (IsOverride)
                    {
                        if (string.CompareOrdinal(p.Name, "EventHandlerType") == 0)
                        {
                            PropertyDescriptorForDisplay p0 = new PropertyDescriptorForDisplay(this.GetType(), p.Name, this.EventHandlerType.TypeName, attributes);
                            list.Add(p0);
                        }
                        else
                        {
                            ReadOnlyPropertyDesc p0 = new ReadOnlyPropertyDesc(p);
                            list.Add(p0);
                        }
                    }
                    else
                    {
                        list.Add(p);
                    }
                }
                if (this.EventHandlerType.IsGenericType)
                {
                    DataTypePointer[] tps = this.EventHandlerType.TypeParameters;
                    if (tps != null && tps.Length > 0)
                    {
                        Type[] tps0 = this.EventHandlerType.BaseClassType.GetGenericArguments();
                        if (tps0 != null && tps0.Length == tps.Length)
                        {
                            for (int i = 0; i < tps.Length; i++)
                            {
                                PropertyDescriptorForDisplay p0 = new PropertyDescriptorForDisplay(this.GetType(), tps0[i].Name, tps[i].BaseClassType.Name, attributes);
                                list.Add(p0);
                            }
                        }
                    }
                }
                ps = new PropertyDescriptorCollection(list.ToArray());
            }
            return(ps);
        }
        public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
        {
            PropertyDescriptorCollection ps = TypeDescriptor.GetProperties(this, attributes, true);

            if (ReadOnly || !AllowTypeChange)
            {
                List <PropertyDescriptor> list = new List <PropertyDescriptor>();
                foreach (PropertyDescriptor p in ps)
                {
                    if (string.CompareOrdinal(p.Name, "DataType") == 0)
                    {
                        if (AllowTypeChange)
                        {
                            list.Add(p);
                        }
                        else
                        {
                            PropertyDescriptorForDisplay pdf = new PropertyDescriptorForDisplay(this.GetType(), p.Name, TypeName, new Attribute[] { });
                            list.Add(pdf);
                        }
                    }
                    else
                    {
                        if (ReadOnly)
                        {
                            ReadOnlyPropertyDesc rp = new ReadOnlyPropertyDesc(p);
                            list.Add(rp);
                        }
                        else
                        {
                            list.Add(p);
                        }
                    }
                }
                ps = new PropertyDescriptorCollection(list.ToArray());
            }
            return(ps);
        }