Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / WhiteSpaceTrimStringConverter.cs / 1305376 / WhiteSpaceTrimStringConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; using System.IO; using System.Reflection; using System.Security.Permissions; using System.Xml; using System.Collections.Specialized; using System.Globalization; using System.ComponentModel; using System.Security; using System.Text; namespace System.Configuration { public sealed class WhiteSpaceTrimStringConverter : ConfigurationConverterBase { public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type) { ValidateType(value, typeof(string)); if (value == null) { return String.Empty; } return ((string)value).Trim(); } public override object ConvertFrom(ITypeDescriptorContext ctx, CultureInfo ci, object data) { Debug.Assert(data is string, "data is string"); return ((string)data).Trim(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SiteMapHierarchicalDataSourceView.cs
- AccessViolationException.cs
- AutoCompleteStringCollection.cs
- ObjRef.cs
- ResourcesGenerator.cs
- NamespaceInfo.cs
- ObjectDisposedException.cs
- ObjectStateManagerMetadata.cs
- Timer.cs
- UxThemeWrapper.cs
- Subtree.cs
- TableRowGroup.cs
- EventSourceCreationData.cs
- InkCanvasSelection.cs
- SourceFileBuildProvider.cs
- TypeForwardedToAttribute.cs
- XmlDataCollection.cs
- ProfileProvider.cs
- ThrowOnMultipleAssignment.cs
- FileUpload.cs
- ImageList.cs
- DataKey.cs
- DecoratedNameAttribute.cs
- SafeSystemMetrics.cs
- nulltextcontainer.cs
- BitmapDownload.cs
- ResourceReferenceExpressionConverter.cs
- ConfigXmlWhitespace.cs
- SizeAnimationClockResource.cs
- UInt16Storage.cs
- ViewLoader.cs
- RegistrySecurity.cs
- MethodExpression.cs
- TemplateControlBuildProvider.cs
- Int32CollectionValueSerializer.cs
- VideoDrawing.cs
- CodeMemberProperty.cs
- CustomAttributeSerializer.cs
- SecurityHelper.cs
- MDIClient.cs
- BasePattern.cs
- XComponentModel.cs
- DotAtomReader.cs
- XmlConverter.cs
- WindowCollection.cs
- GenericEnumConverter.cs
- PointHitTestParameters.cs
- rsa.cs
- DbConnectionPoolOptions.cs
- DataFormats.cs
- ContentType.cs
- Wizard.cs
- TypeConverterAttribute.cs
- StringAnimationBase.cs
- Marshal.cs
- LayoutEditorPart.cs
- TextEffect.cs
- OciHandle.cs
- TcpTransportManager.cs
- WindowsNonControl.cs
- Activator.cs
- PointCollection.cs
- SoapIgnoreAttribute.cs
- ObjectSet.cs
- RedirectionProxy.cs
- FamilyTypeface.cs
- RemoteHelper.cs
- AppSettingsSection.cs
- ListView.cs
- ImageKeyConverter.cs
- DataSourceCacheDurationConverter.cs
- CommunicationException.cs
- WizardForm.cs
- TrackBarDesigner.cs
- HierarchicalDataBoundControlAdapter.cs
- OrthographicCamera.cs
- _WebProxyDataBuilder.cs
- ReliableInputConnection.cs
- SymbolEqualComparer.cs
- HScrollBar.cs
- OletxResourceManager.cs
- SqlUtils.cs
- TextServicesCompartment.cs
- PolicyChain.cs
- TextElement.cs
- AudioSignalProblemOccurredEventArgs.cs
- ManagementInstaller.cs
- DataBinding.cs
- _AutoWebProxyScriptWrapper.cs
- FileDialog_Vista_Interop.cs
- SecurityTokenResolver.cs
- GeneralTransform3D.cs
- MembershipAdapter.cs
- URLIdentityPermission.cs
- AudioFileOut.cs
- UserControlBuildProvider.cs
- unitconverter.cs
- GroupBoxAutomationPeer.cs
- StrokeNodeOperations2.cs
- RuntimeIdentifierPropertyAttribute.cs