Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / Configuration / LowerCaseStringConverter.cs / 1 / 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. // //----------------------------------------------------------------------------- /***************************************************************************** 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataQuery.cs
- UserMapPath.cs
- PathSegmentCollection.cs
- WindowHideOrCloseTracker.cs
- IdentifierService.cs
- DateTime.cs
- ResolveNameEventArgs.cs
- Error.cs
- WebPartCloseVerb.cs
- RangeBase.cs
- QueueProcessor.cs
- BaseCodeDomTreeGenerator.cs
- XPathParser.cs
- Comparer.cs
- DataColumnMappingCollection.cs
- BufferedWebEventProvider.cs
- EventSinkHelperWriter.cs
- ParameterModifier.cs
- TextSearch.cs
- SmtpNegotiateAuthenticationModule.cs
- EventManager.cs
- TextEffect.cs
- ReadOnlyTernaryTree.cs
- SQLMoneyStorage.cs
- InfoCardTrace.cs
- UriScheme.cs
- BitmapEffectGroup.cs
- CatalogPartCollection.cs
- ToolStripTextBox.cs
- NullableDecimalMinMaxAggregationOperator.cs
- HttpListenerRequest.cs
- SecurityHelper.cs
- AppSettingsExpressionBuilder.cs
- HttpRuntime.cs
- XamlHostingSectionGroup.cs
- RectangleGeometry.cs
- SecurityPolicyVersion.cs
- PictureBox.cs
- SchemaManager.cs
- ControlFilterExpression.cs
- BindUriHelper.cs
- EmissiveMaterial.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- PagedDataSource.cs
- TerminatorSinks.cs
- DisposableCollectionWrapper.cs
- BinaryReader.cs
- SoapTypeAttribute.cs
- DesignBindingValueUIHandler.cs
- AccessKeyManager.cs
- XmlReaderDelegator.cs
- Invariant.cs
- RuleAttributes.cs
- CorrelationExtension.cs
- ArrayTypeMismatchException.cs
- BrushMappingModeValidation.cs
- Atom10FormatterFactory.cs
- SqlDataSourceView.cs
- WebPartConnectionsDisconnectVerb.cs
- StylusCaptureWithinProperty.cs
- ObjectSecurity.cs
- DbConnectionOptions.cs
- Viewport2DVisual3D.cs
- XmlStreamStore.cs
- SqlDataSourceEnumerator.cs
- XmlSchemaComplexType.cs
- WebProxyScriptElement.cs
- UInt32Converter.cs
- WSHttpBindingBaseElement.cs
- DrawingGroupDrawingContext.cs
- DesignBindingEditor.cs
- MetadataHelper.cs
- TextDecorations.cs
- SecureUICommand.cs
- WizardStepBase.cs
- ErrorEventArgs.cs
- HttpWebRequestElement.cs
- Helpers.cs
- Comparer.cs
- SerializeAbsoluteContext.cs
- ServiceActivationException.cs
- GenericAuthenticationEventArgs.cs
- assertwrapper.cs
- LinkLabel.cs
- XmlSchemaSimpleType.cs
- SQLSingleStorage.cs
- DataGridViewImageColumn.cs
- ResourceManagerWrapper.cs
- log.cs
- WindowsGraphicsCacheManager.cs
- OutputChannelBinder.cs
- ReceiveContext.cs
- ViewCellSlot.cs
- _NTAuthentication.cs
- BamlRecordHelper.cs
- UpdateManifestForBrowserApplication.cs
- DoubleLinkListEnumerator.cs
- TextLineResult.cs
- EditorPart.cs
- SqlWriter.cs