Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / LowerCaseStringConverter.cs / 1305376 / LowerCaseStringConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /***************************************************************************** From machine.config******************************************************************************/ namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.Globalization; using System.IO; using System.Text; using System.Web.Util; using System.ComponentModel; using System.Security.Permissions; public sealed class LowerCaseStringConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext ctx, Type type) { return (type == typeof(string)); } public override bool CanConvertFrom(ITypeDescriptorContext ctx, Type type) { return (type == typeof(string)); } public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type) { if (value == null) { return String.Empty; } return ((string)value).ToLower(CultureInfo.InvariantCulture); } public override object ConvertFrom(ITypeDescriptorContext ctx, CultureInfo ci, object data) { Debug.Assert(data != null); Debug.Assert(data is string); return ((string)data).ToLower(CultureInfo.InvariantCulture); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /***************************************************************************** From machine.config******************************************************************************/ namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.Globalization; using System.IO; using System.Text; using System.Web.Util; using System.ComponentModel; using System.Security.Permissions; public sealed class LowerCaseStringConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext ctx, Type type) { return (type == typeof(string)); } public override bool CanConvertFrom(ITypeDescriptorContext ctx, Type type) { return (type == typeof(string)); } public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type) { if (value == null) { return String.Empty; } return ((string)value).ToLower(CultureInfo.InvariantCulture); } public override object ConvertFrom(ITypeDescriptorContext ctx, CultureInfo ci, object data) { Debug.Assert(data != null); Debug.Assert(data is string); return ((string)data).ToLower(CultureInfo.InvariantCulture); } } } // 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
- Walker.cs
- WarningException.cs
- GridViewRowPresenterBase.cs
- WebBrowserBase.cs
- HybridDictionary.cs
- RelatedCurrencyManager.cs
- ImageListUtils.cs
- AuthorizationContext.cs
- KerberosSecurityTokenParameters.cs
- StylusPointProperties.cs
- AddInBase.cs
- x509utils.cs
- QilXmlWriter.cs
- CharUnicodeInfo.cs
- ActiveDocumentEvent.cs
- OdbcCommandBuilder.cs
- TailPinnedEventArgs.cs
- SmiEventStream.cs
- ClassicBorderDecorator.cs
- RangeValidator.cs
- HostedNamedPipeTransportManager.cs
- WindowsAuthenticationEventArgs.cs
- ClientEventManager.cs
- DragDeltaEventArgs.cs
- ExtenderProvidedPropertyAttribute.cs
- ByteRangeDownloader.cs
- EncoderBestFitFallback.cs
- DefaultShape.cs
- XmlWellformedWriterHelpers.cs
- HttpCapabilitiesBase.cs
- WebPartMenuStyle.cs
- ToolStripDropDown.cs
- DivideByZeroException.cs
- StylusPointPropertyId.cs
- StringReader.cs
- ComponentTray.cs
- XPathNodeIterator.cs
- AutoSizeToolBoxItem.cs
- X509LogoTypeExtension.cs
- Material.cs
- BinaryUtilClasses.cs
- TextContainer.cs
- MutableAssemblyCacheEntry.cs
- ButtonBase.cs
- CssStyleCollection.cs
- LayoutUtils.cs
- _LocalDataStoreMgr.cs
- FixedLineResult.cs
- EnterpriseServicesHelper.cs
- Roles.cs
- VarRemapper.cs
- ObjectHelper.cs
- MediaScriptCommandRoutedEventArgs.cs
- EndOfStreamException.cs
- ReaderWriterLock.cs
- TabControlAutomationPeer.cs
- DynamicArgumentDialog.cs
- FlowLayoutPanel.cs
- IndexOutOfRangeException.cs
- SingleAnimationBase.cs
- TranslateTransform3D.cs
- GenericEnumConverter.cs
- SatelliteContractVersionAttribute.cs
- ReceiveDesigner.xaml.cs
- DataGridDesigner.cs
- UnmanagedMemoryStreamWrapper.cs
- DependencyPropertyChangedEventArgs.cs
- ClientRuntimeConfig.cs
- TextSearch.cs
- BamlResourceContent.cs
- TextServicesManager.cs
- CardSpaceSelector.cs
- TraceListener.cs
- OutgoingWebRequestContext.cs
- ExpressionCopier.cs
- LineProperties.cs
- CodeMethodInvokeExpression.cs
- Base64Stream.cs
- EnvelopedSignatureTransform.cs
- CodeTypeMember.cs
- ErasingStroke.cs
- Thread.cs
- ThemeableAttribute.cs
- PassportPrincipal.cs
- BitmapEffectDrawing.cs
- ValueTypeFixupInfo.cs
- RSAOAEPKeyExchangeFormatter.cs
- FileEnumerator.cs
- ProviderCollection.cs
- TextTreeRootNode.cs
- SoapCommonClasses.cs
- SystemNetHelpers.cs
- XmlSchemaAll.cs
- FocusManager.cs
- WebPartManager.cs
- QuadraticBezierSegment.cs
- WindowsListView.cs
- EntityContainer.cs
- PathFigureCollection.cs
- ExternalException.cs