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
- PopupEventArgs.cs
- HMACSHA384.cs
- DataGridCommandEventArgs.cs
- AnonymousIdentificationModule.cs
- ReferenceConverter.cs
- ImmutableAssemblyCacheEntry.cs
- CheckoutException.cs
- GraphicsContainer.cs
- SelectionProviderWrapper.cs
- ToolStripContainer.cs
- dbenumerator.cs
- DoubleSumAggregationOperator.cs
- DbParameterCollection.cs
- StorageEntitySetMapping.cs
- FontDialog.cs
- HtmlEncodedRawTextWriter.cs
- XmlHierarchicalEnumerable.cs
- CodeDOMUtility.cs
- XmlTextAttribute.cs
- GridSplitter.cs
- ConstraintConverter.cs
- BidOverLoads.cs
- WindowsEditBox.cs
- XPathMultyIterator.cs
- DataGridViewCellStateChangedEventArgs.cs
- XmlDictionary.cs
- XmlAnyAttributeAttribute.cs
- CustomPeerResolverService.cs
- NetworkInformationException.cs
- PermissionListSet.cs
- ButtonField.cs
- ConstructorExpr.cs
- MethodCallConverter.cs
- UserControlAutomationPeer.cs
- ProjectionPathSegment.cs
- XmlnsDictionary.cs
- DataPagerFieldItem.cs
- PersistenceTypeAttribute.cs
- Point3DValueSerializer.cs
- CmsInterop.cs
- NameNode.cs
- Menu.cs
- ExpressionPrefixAttribute.cs
- StreamReader.cs
- HttpDateParse.cs
- ComponentDesigner.cs
- ListViewSelectEventArgs.cs
- GridViewRow.cs
- SystemPens.cs
- LZCodec.cs
- EmptyStringExpandableObjectConverter.cs
- FieldToken.cs
- KeyValueConfigurationCollection.cs
- StrokeCollection.cs
- GridViewAutomationPeer.cs
- RotationValidation.cs
- DataControlFieldHeaderCell.cs
- IssuanceLicense.cs
- WinCategoryAttribute.cs
- HwndSourceParameters.cs
- GenericTypeParameterBuilder.cs
- SplayTreeNode.cs
- LoadedOrUnloadedOperation.cs
- CodeArgumentReferenceExpression.cs
- MultipartContentParser.cs
- SimpleBitVector32.cs
- CounterSample.cs
- DiffuseMaterial.cs
- XmlSigningNodeWriter.cs
- Rule.cs
- SqlSupersetValidator.cs
- SqlServices.cs
- SizeLimitedCache.cs
- EventOpcode.cs
- XmlSchemas.cs
- ActiveXSite.cs
- XamlFilter.cs
- ImageList.cs
- InternalCache.cs
- StrokeNodeData.cs
- InputProcessorProfilesLoader.cs
- ObjectListSelectEventArgs.cs
- BrowserTree.cs
- AuthenticationService.cs
- DecoderNLS.cs
- ByteStreamMessageEncodingElement.cs
- EventData.cs
- AmbiguousMatchException.cs
- ScaleTransform.cs
- BaseDataListDesigner.cs
- BitmapEffectInputConnector.cs
- ReadWriteObjectLock.cs
- TextDecorationUnitValidation.cs
- LogExtent.cs
- ProfileProvider.cs
- DrawingImage.cs
- ExtenderProvidedPropertyAttribute.cs
- StringConverter.cs
- XmlQueryRuntime.cs
- WebColorConverter.cs