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
- OSFeature.cs
- DayRenderEvent.cs
- Quaternion.cs
- LiteralTextParser.cs
- messageonlyhwndwrapper.cs
- AssociatedControlConverter.cs
- OraclePermission.cs
- TreeViewEvent.cs
- FontFamily.cs
- EmptyEnumerable.cs
- PersistChildrenAttribute.cs
- InputProcessorProfilesLoader.cs
- SecurityElementBase.cs
- SchemaNames.cs
- DataGridLinkButton.cs
- MarshalByValueComponent.cs
- LinqDataSourceValidationException.cs
- PeerName.cs
- BevelBitmapEffect.cs
- DataGridRowEventArgs.cs
- CorrelationKey.cs
- BitmapMetadataBlob.cs
- SettingsPropertyWrongTypeException.cs
- EventToken.cs
- ResourceManagerWrapper.cs
- Int64KeyFrameCollection.cs
- UserControlAutomationPeer.cs
- StringHandle.cs
- TemplatedWizardStep.cs
- TypeDescriptorContext.cs
- SqlGenerator.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- ImageSourceValueSerializer.cs
- HttpAsyncResult.cs
- HMACSHA512.cs
- MethodMessage.cs
- EventSinkActivity.cs
- HitTestWithGeometryDrawingContextWalker.cs
- sqlser.cs
- ImageDrawing.cs
- ComplexBindingPropertiesAttribute.cs
- ToolStripProgressBar.cs
- ReflectPropertyDescriptor.cs
- TextFindEngine.cs
- XmlMtomReader.cs
- SafePEFileHandle.cs
- WebSysDefaultValueAttribute.cs
- RegexTree.cs
- InstancePersistenceException.cs
- webeventbuffer.cs
- SrgsToken.cs
- BaseValidator.cs
- PeerInvitationResponse.cs
- basecomparevalidator.cs
- OptimizedTemplateContentHelper.cs
- XmlDataProvider.cs
- AudioFormatConverter.cs
- EntityContainer.cs
- XNodeValidator.cs
- DataFormat.cs
- SchemaNamespaceManager.cs
- linebase.cs
- NumberFormatter.cs
- RayMeshGeometry3DHitTestResult.cs
- DBSchemaTable.cs
- PersonalizablePropertyEntry.cs
- DrawingImage.cs
- AspNetHostingPermission.cs
- XmlCollation.cs
- ServicesUtilities.cs
- Point3DAnimationBase.cs
- ClientSettingsStore.cs
- RadialGradientBrush.cs
- Helper.cs
- ToolBarDesigner.cs
- SchemaTableOptionalColumn.cs
- ListenerElementsCollection.cs
- CodeGroup.cs
- DataControlFieldHeaderCell.cs
- UnsafeNativeMethods.cs
- CollectionBuilder.cs
- AttachedPropertyBrowsableAttribute.cs
- ProxyWebPartConnectionCollection.cs
- TokenFactoryBase.cs
- XmlDocumentSerializer.cs
- MatrixCamera.cs
- SiteMembershipCondition.cs
- ScrollableControl.cs
- SubordinateTransaction.cs
- CodeGroup.cs
- TrustManager.cs
- QueryHandler.cs
- HeaderCollection.cs
- MdImport.cs
- TrackingMemoryStreamFactory.cs
- OptionalColumn.cs
- ValueTable.cs
- TextElementEditingBehaviorAttribute.cs
- SqlExpander.cs
- LambdaCompiler.Generated.cs