ParticleEditorControls.TypeConverters.EnumToString.GetStandardValues C# (CSharp) Method

GetStandardValues() public method

public GetStandardValues ( ITypeDescriptorContext context ) : TypeConverter.StandardValuesCollection
context ITypeDescriptorContext
return System.ComponentModel.TypeConverter.StandardValuesCollection
        public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            if (EnumType == null)
            {
                throw new InvalidOperationException("EnumType must be set before calling GetStandardValues");
            }

            values.Clear();

            foreach (var value in Enum.GetNames(EnumType))
            {
                values.Add(value);
            }

            StandardValuesCollection svc = new StandardValuesCollection(values);

            return svc;
        }