MySql.Data.VisualStudio.DbObjects.Index.GetProperties C# (CSharp) Method

GetProperties() public method

public GetProperties ( Attribute attributes ) : PropertyDescriptorCollection
attributes System.Attribute
return System.ComponentModel.PropertyDescriptorCollection
    public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
    {
      PropertyDescriptorCollection coll =
          TypeDescriptor.GetProperties(this, attributes, true);

      List<PropertyDescriptor> props = new List<PropertyDescriptor>();

      foreach (PropertyDescriptor pd in coll)
      {
        if (!pd.IsBrowsable) continue;

        if (pd.Name == "IsUnique" || pd.Name == "Name" || pd.Name == "Type")
        {
          if (IsPrimary)
          {
            CustomPropertyDescriptor newPd = new CustomPropertyDescriptor(pd);
            newPd.SetReadOnly(true);
            props.Add(newPd);
          }
        }
        else if (pd.Name == "FullText" && (Spatial ||
                 String.Compare(table.Engine, "myisam", true) != 0))
        {
          CustomPropertyDescriptor newPd = new CustomPropertyDescriptor(pd);
          newPd.SetReadOnly(true);
          props.Add(newPd);
        }
        else if (pd.Name == "Spatial" && (FullText ||
                 String.Compare(table.Engine, "myisam", true) != 0))
        {
          CustomPropertyDescriptor newPd = new CustomPropertyDescriptor(pd);
          newPd.SetReadOnly(true);
          props.Add(newPd);
        }
        else
          props.Add(pd);
      }
      return new PropertyDescriptorCollection(props.ToArray());
    }