public static PropertyDescriptorCollection GetWebClientProperties(IWebClientComponent obj, StringCollection names, Attribute[] attributes)
        {
            PropertyDescriptorCollection ps  = TypeDescriptor.GetProperties(obj, attributes, true);
            List <PropertyDescriptor>    lst = new List <PropertyDescriptor>();

            foreach (PropertyDescriptor p in ps)
            {
                if (names == null || names.Contains(p.Name))
                {
                    if (VPLUtil.IsCompiling)
                    {
                        lst.Add(p);
                    }
                    else
                    {
                        if (VPLUtil.HasAttribute(p, typeof(ReadOnlyInProgrammingAttribute)))
                        {
                            lst.Add(new ReadOnlyPropertyDesc(p));
                        }
                        else
                        {
                            lst.Add(p);
                        }
                    }
                }
            }
            WebClientValueCollection.AddPropertyDescs(lst, obj.CustomValues);
            return(new PropertyDescriptorCollection(lst.ToArray()));
        }