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
- StringWriter.cs
- CodeDomSerializationProvider.cs
- ComponentResourceKey.cs
- RowCache.cs
- DirectoryNotFoundException.cs
- AnimationClock.cs
- ResourceCodeDomSerializer.cs
- XsdBuildProvider.cs
- IfAction.cs
- SqlException.cs
- FormViewInsertEventArgs.cs
- CommandBinding.cs
- NameValueSectionHandler.cs
- XPathExpr.cs
- ConfigXmlComment.cs
- EndPoint.cs
- ModulesEntry.cs
- XsdBuildProvider.cs
- ScrollChangedEventArgs.cs
- HtmlPanelAdapter.cs
- ColumnClickEvent.cs
- LicenseException.cs
- VariableQuery.cs
- DeferredElementTreeState.cs
- CacheModeValueSerializer.cs
- PerformanceCounterPermissionEntry.cs
- documentsequencetextpointer.cs
- DBSchemaRow.cs
- WmlPageAdapter.cs
- TextTreeNode.cs
- AnnouncementEndpoint.cs
- PropertyNames.cs
- AccessDataSourceWizardForm.cs
- ResourcesBuildProvider.cs
- RoutingExtensionElement.cs
- TextTreeTextBlock.cs
- GacUtil.cs
- ImmComposition.cs
- ListBindableAttribute.cs
- WS2007HttpBindingCollectionElement.cs
- ExtractedStateEntry.cs
- EventDescriptor.cs
- FormCollection.cs
- SafeHandles.cs
- ValueOfAction.cs
- ParallelLoopState.cs
- MetadataStore.cs
- DataChangedEventManager.cs
- DispatchProxy.cs
- AddInPipelineAttributes.cs
- SecurityDocument.cs
- GroupBoxRenderer.cs
- TextEncodedRawTextWriter.cs
- ToolStripItemCollection.cs
- InvalidContentTypeException.cs
- Input.cs
- PriorityBinding.cs
- ServiceEndpoint.cs
- XamlPathDataSerializer.cs
- BindValidationContext.cs
- XhtmlBasicListAdapter.cs
- wgx_commands.cs
- ImageMap.cs
- SoapExtensionImporter.cs
- IsolatedStorageException.cs
- SecurityManager.cs
- PartialCachingControl.cs
- GPStream.cs
- ServiceOperation.cs
- GridLengthConverter.cs
- MetadataWorkspace.cs
- LifetimeServices.cs
- BookmarkCallbackWrapper.cs
- FontStyleConverter.cs
- Int32Collection.cs
- ChildDocumentBlock.cs
- DefaultTextStore.cs
- StateWorkerRequest.cs
- OperatingSystem.cs
- Shape.cs
- RedirectionProxy.cs
- RecognitionEventArgs.cs
- InvalidOleVariantTypeException.cs
- UnsafeNativeMethods.cs
- CheckBoxPopupAdapter.cs
- CodeDomComponentSerializationService.cs
- TagMapInfo.cs
- StagingAreaInputItem.cs
- OdbcCommandBuilder.cs
- ClockGroup.cs
- SecurityTokenSerializer.cs
- DataStreamFromComStream.cs
- AssociationType.cs
- TimeEnumHelper.cs
- NavigationHelper.cs
- ListBindingConverter.cs
- Win32NamedPipes.cs
- DescendantBaseQuery.cs
- ArrayWithOffset.cs
- CapabilitiesSection.cs