Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Services / Monitoring / system / Diagnosticts / Design / StringValueConverter.cs / 1 / StringValueConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Diagnostics.Design { using System; using System.ComponentModel; using System.ComponentModel.Design; using System.Globalization; ///internal class StringValueConverter : TypeConverter { /// public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string)) { return true; } return base.CanConvertFrom(context, sourceType); } /// public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string) { string text = ((string)value).Trim(); if (text == String.Empty) text = null; return text; } return base.ConvertFrom(context, culture, value); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Rectangle.cs
- WsatAdminException.cs
- ClientBase.cs
- SlotInfo.cs
- DynamicPhysicalDiscoSearcher.cs
- KeyValuePair.cs
- SqlDataSourceConnectionPanel.cs
- SQLBytesStorage.cs
- BroadcastEventHelper.cs
- _NegoStream.cs
- PlaceHolder.cs
- NavigateEvent.cs
- ScaleTransform.cs
- SectionRecord.cs
- CollectionsUtil.cs
- XmlElementList.cs
- SqlComparer.cs
- WSDualHttpBindingElement.cs
- ContentTextAutomationPeer.cs
- ColorConvertedBitmap.cs
- SqlDataAdapter.cs
- AQNBuilder.cs
- XmlAttributeCollection.cs
- CryptoHelper.cs
- WebServiceResponse.cs
- SamlAttributeStatement.cs
- WebPartPersonalization.cs
- XmlDocumentFragment.cs
- MouseActionConverter.cs
- ActiveDocumentEvent.cs
- ColorConvertedBitmap.cs
- BStrWrapper.cs
- FontFamilyIdentifier.cs
- TaskbarItemInfo.cs
- UserUseLicenseDictionaryLoader.cs
- UICuesEvent.cs
- CharEnumerator.cs
- CellRelation.cs
- SqlEnums.cs
- TrackingServices.cs
- CustomTypeDescriptor.cs
- ConnectionOrientedTransportChannelListener.cs
- NotImplementedException.cs
- Misc.cs
- RuntimeIdentifierPropertyAttribute.cs
- LambdaCompiler.Statements.cs
- SiteMap.cs
- ScaleTransform.cs
- StylusPointPropertyId.cs
- DrawingCollection.cs
- DataServiceContext.cs
- Monitor.cs
- LazyInitializer.cs
- ChangesetResponse.cs
- AudioBase.cs
- PropertyCollection.cs
- ColumnHeader.cs
- ElapsedEventArgs.cs
- CmsInterop.cs
- FileClassifier.cs
- CodeVariableReferenceExpression.cs
- TextElementEnumerator.cs
- LocalBuilder.cs
- HttpApplicationStateWrapper.cs
- SettingsPropertyCollection.cs
- SQLGuidStorage.cs
- ListSortDescription.cs
- RelationshipDetailsRow.cs
- ListViewGroup.cs
- InvalidComObjectException.cs
- BuilderElements.cs
- HashAlgorithm.cs
- SaveFileDialog.cs
- XmlSchemaParticle.cs
- AttributeAction.cs
- ThreadStartException.cs
- ViewStateException.cs
- NamedPipeProcessProtocolHandler.cs
- FontFamily.cs
- ImageListImage.cs
- Material.cs
- ProgressBar.cs
- AssemblyInfo.cs
- ServicePointManager.cs
- OletxTransactionManager.cs
- PageCatalogPart.cs
- ToolStripScrollButton.cs
- FramingDecoders.cs
- ParseHttpDate.cs
- Variable.cs
- SoapProtocolReflector.cs
- NameValueConfigurationElement.cs
- ToolStripContentPanelDesigner.cs
- IisTraceWebEventProvider.cs
- ContainerUIElement3D.cs
- CredentialCache.cs
- SmiEventStream.cs
- MetadataPropertyCollection.cs
- ToolStripSplitButton.cs
- VirtualPath.cs