Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Monitoring / system / Diagnosticts / AlphabeticalEnumConverter.cs / 1305376 / AlphabeticalEnumConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Diagnostics { using System.Collections; using System.ComponentModel; using System; using System.Globalization; ////// /// internal class AlphabeticalEnumConverter : EnumConverter { public AlphabeticalEnumConverter(Type type) : base(type) { } public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (Values == null) { Array objValues = Enum.GetValues(EnumType); //IComparer comparer = Comparer; object[] names = new object[objValues.Length]; for (int i = 0; i < names.Length; i++) names[i] = ConvertTo(context, null, objValues.GetValue(i), typeof(string)); Array.Sort(names, objValues, 0, objValues.Length, System.Collections.Comparer.Default); Values = new StandardValuesCollection(objValues); } return Values; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Provides a type converter to /// convert ???? objects to and from various other representations. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RtType.cs
- DBSchemaTable.cs
- AuthenticationConfig.cs
- BamlStream.cs
- EventNotify.cs
- XmlUnspecifiedAttribute.cs
- ThumbAutomationPeer.cs
- RSATokenProvider.cs
- ContextMarshalException.cs
- GenericQueueSurrogate.cs
- Table.cs
- XhtmlBasicLiteralTextAdapter.cs
- DataList.cs
- Menu.cs
- HttpCapabilitiesBase.cs
- DataTemplateKey.cs
- MsmqBindingElementBase.cs
- SpinLock.cs
- EUCJPEncoding.cs
- HttpResponseInternalBase.cs
- OleDbWrapper.cs
- TrackBarRenderer.cs
- ListParaClient.cs
- GeometryHitTestParameters.cs
- HtmlUtf8RawTextWriter.cs
- EntitySetDataBindingList.cs
- DecoderExceptionFallback.cs
- NotCondition.cs
- PhysicalAddress.cs
- CssTextWriter.cs
- SelectionPattern.cs
- Vector3DAnimationBase.cs
- SelectionEditor.cs
- LingerOption.cs
- LabelEditEvent.cs
- SafeNativeMethods.cs
- BaseDataBoundControl.cs
- DataSvcMapFileSerializer.cs
- SqlServer2KCompatibilityAnnotation.cs
- IODescriptionAttribute.cs
- GlobalAclOperationRequirement.cs
- VarRefManager.cs
- SendMailErrorEventArgs.cs
- EastAsianLunisolarCalendar.cs
- MultipartContentParser.cs
- SymbolEqualComparer.cs
- ContextConfiguration.cs
- ShapeTypeface.cs
- ErrorHandlerModule.cs
- CodeLinePragma.cs
- ArrayElementGridEntry.cs
- CodePropertyReferenceExpression.cs
- DateTimeValueSerializerContext.cs
- SafeNativeMethods.cs
- AttachmentCollection.cs
- ValidationHelper.cs
- SecurityTokenProvider.cs
- DesignerOptions.cs
- BitmapMetadataEnumerator.cs
- RootNamespaceAttribute.cs
- ClickablePoint.cs
- Rect3DConverter.cs
- WindowsGraphicsCacheManager.cs
- DesignTimeData.cs
- WorkerProcess.cs
- PermissionListSet.cs
- DtdParser.cs
- ConsumerConnectionPointCollection.cs
- diagnosticsswitches.cs
- StylusPointPropertyInfoDefaults.cs
- PartitionerStatic.cs
- TextTreeText.cs
- XmlSchemaType.cs
- EntityModelSchemaGenerator.cs
- Constants.cs
- FontTypeConverter.cs
- FunctionMappingTranslator.cs
- SettingsProperty.cs
- ListBoxItemAutomationPeer.cs
- SimpleHandlerBuildProvider.cs
- DataFieldEditor.cs
- PageStatePersister.cs
- EnumerableValidator.cs
- ServiceBusyException.cs
- Stack.cs
- StringBlob.cs
- ContractCodeDomInfo.cs
- BehaviorEditorPart.cs
- __Filters.cs
- ResourceDescriptionAttribute.cs
- HttpCachePolicyElement.cs
- CounterSetInstanceCounterDataSet.cs
- SynchronizedInputHelper.cs
- OrderedDictionaryStateHelper.cs
- MappingException.cs
- Grid.cs
- RemotingAttributes.cs
- ComponentResourceKeyConverter.cs
- TransformCollection.cs
- Binding.cs