Castle.MonoRail.Framework.Views.Aspx.EventListConverter.GetStandardValues C# (CSharp) Method

GetStandardValues() public method

Returns a collection of standard values for the data type this type converter is designed for when provided with a format context.
public GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection
context ITypeDescriptorContext An that provides a format context that can be used to extract additional information about the environment from which this converter is invoked. This parameter or properties of this parameter can be null.
return StandardValuesCollection
		public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
		{
			if (context != null)
			{
				EventDescriptorCollection events = GetAvailableEvents(context);

				string[] eventNames = new string[events.Count];

				for (int i = 0; i < events.Count; ++i)
				{
					eventNames[i] = events[i].Name;
				}

				Array.Sort(eventNames);

				return new StandardValuesCollection(eventNames);
			}

			return base.GetStandardValues(context);
		}