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
- RegularExpressionValidator.cs
- WebServiceEnumData.cs
- ActiveDocumentEvent.cs
- ItemsControl.cs
- ButtonBase.cs
- PenCursorManager.cs
- GridViewSelectEventArgs.cs
- CellTreeNode.cs
- AnonymousIdentificationSection.cs
- CanonicalizationDriver.cs
- LoginCancelEventArgs.cs
- SupportsEventValidationAttribute.cs
- ManifestResourceInfo.cs
- EventHandlingScope.cs
- TemplateInstanceAttribute.cs
- MetafileHeaderEmf.cs
- ArrangedElement.cs
- CorrelationValidator.cs
- PrintEvent.cs
- SecurityContext.cs
- MenuStrip.cs
- MetadataCache.cs
- OutputCacheProfileCollection.cs
- XsltContext.cs
- BuildManager.cs
- EndpointConfigContainer.cs
- WebSysDisplayNameAttribute.cs
- ElasticEase.cs
- Visitor.cs
- CellParagraph.cs
- WebPartMinimizeVerb.cs
- ProtocolsSection.cs
- Solver.cs
- SectionRecord.cs
- PropertyRecord.cs
- DateTimeConverter2.cs
- RepeatButtonAutomationPeer.cs
- ControlAdapter.cs
- _TransmitFileOverlappedAsyncResult.cs
- PointConverter.cs
- MsmqChannelFactory.cs
- IndicCharClassifier.cs
- StoragePropertyMapping.cs
- SafeArrayTypeMismatchException.cs
- ObjectSet.cs
- TableCell.cs
- WebPartDescription.cs
- BreakRecordTable.cs
- ThemeInfoAttribute.cs
- XPathChildIterator.cs
- Command.cs
- _FixedSizeReader.cs
- ScrollBar.cs
- RepeaterItemEventArgs.cs
- DataGridViewColumn.cs
- FileRecordSequenceHelper.cs
- XmlCharType.cs
- RegexGroup.cs
- SystemSounds.cs
- FixedSOMSemanticBox.cs
- ContextQuery.cs
- ImportCatalogPart.cs
- GridViewSelectEventArgs.cs
- SearchExpression.cs
- XhtmlBasicCalendarAdapter.cs
- InputBindingCollection.cs
- Int32Rect.cs
- TemplateContainer.cs
- XmlTextReaderImplHelpers.cs
- ItemDragEvent.cs
- AssemblyEvidenceFactory.cs
- Point3DKeyFrameCollection.cs
- Char.cs
- TreeNode.cs
- SequentialWorkflowHeaderFooter.cs
- XmlLanguage.cs
- TypeUtil.cs
- assemblycache.cs
- CompilationLock.cs
- WebPartsPersonalizationAuthorization.cs
- EntityDataSourceContextCreatedEventArgs.cs
- OleDbFactory.cs
- SmtpFailedRecipientsException.cs
- SafeNativeMethods.cs
- GenericEnumConverter.cs
- DesignBindingConverter.cs
- MsmqInputChannel.cs
- SequentialWorkflowRootDesigner.cs
- StorageEntitySetMapping.cs
- ListMarkerLine.cs
- DelegatingConfigHost.cs
- ColumnWidthChangedEvent.cs
- EntityWrapperFactory.cs
- XmlCDATASection.cs
- ContextMenuService.cs
- DragDeltaEventArgs.cs
- HTTPNotFoundHandler.cs
- InkCanvasSelection.cs
- InternalConfigSettingsFactory.cs
- CompilerLocalReference.cs