Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Configuration / LowerCaseStringConverter.cs / 2 / 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; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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. //------------------------------------------------------------------------------ // // 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; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextTreeRootTextBlock.cs
- ScriptRef.cs
- SByteStorage.cs
- XmlAttributeCache.cs
- EmptyElement.cs
- XmlQueryOutput.cs
- ExpressionCopier.cs
- RemotingSurrogateSelector.cs
- DataGridViewHitTestInfo.cs
- ExpressionBindingCollection.cs
- smtpconnection.cs
- MouseGestureConverter.cs
- PersianCalendar.cs
- SHA512Managed.cs
- BoundPropertyEntry.cs
- MediaCommands.cs
- ISAPIWorkerRequest.cs
- PowerModeChangedEventArgs.cs
- TypeConverterValueSerializer.cs
- BufferManager.cs
- PipeStream.cs
- OAVariantLib.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- CaseInsensitiveHashCodeProvider.cs
- Drawing.cs
- EntityDataSourceValidationException.cs
- Selector.cs
- Pair.cs
- OLEDB_Enum.cs
- XomlCompiler.cs
- OLEDB_Enum.cs
- ThemeableAttribute.cs
- TimeSpanSecondsConverter.cs
- BuildProviderCollection.cs
- TemplateBuilder.cs
- Adorner.cs
- Icon.cs
- Size3D.cs
- MultiBindingExpression.cs
- ScriptResourceInfo.cs
- GridItemProviderWrapper.cs
- ListViewGroupConverter.cs
- CodeTypeDeclaration.cs
- SQLCharsStorage.cs
- Point4DConverter.cs
- MultiTrigger.cs
- TemplateControl.cs
- RawUIStateInputReport.cs
- DesignTimeType.cs
- FileDetails.cs
- NamespaceInfo.cs
- PaintValueEventArgs.cs
- CalendarDay.cs
- ZipIOCentralDirectoryFileHeader.cs
- FlagsAttribute.cs
- ProtectedConfiguration.cs
- DbDataSourceEnumerator.cs
- MouseButtonEventArgs.cs
- PerfProviderCollection.cs
- ComboBoxRenderer.cs
- ProtocolViolationException.cs
- Form.cs
- CustomCredentialPolicy.cs
- Win32Exception.cs
- CompositeControl.cs
- FrameworkReadOnlyPropertyMetadata.cs
- ConnectorRouter.cs
- diagnosticsswitches.cs
- ButtonBase.cs
- CompiledXpathExpr.cs
- DataGridViewCellValidatingEventArgs.cs
- DesignTimeParseData.cs
- ScalarConstant.cs
- TemplateBaseAction.cs
- Rect3D.cs
- BindingManagerDataErrorEventArgs.cs
- QilLoop.cs
- DropShadowEffect.cs
- AsymmetricAlgorithm.cs
- Page.cs
- DbConnectionPoolCounters.cs
- WSDualHttpBindingCollectionElement.cs
- SelectionListComponentEditor.cs
- ReturnValue.cs
- AnimationLayer.cs
- XmlSerializableServices.cs
- FastPropertyAccessor.cs
- CompilationLock.cs
- compensatingcollection.cs
- FactoryId.cs
- VectorConverter.cs
- SelectorAutomationPeer.cs
- ObjectResult.cs
- CodeCompiler.cs
- Events.cs
- WebBrowserEvent.cs
- BitmapMetadataBlob.cs
- TableItemStyle.cs
- TogglePattern.cs
- TreeViewImageIndexConverter.cs