Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Configuration / LowerCaseStringConverter.cs / 5 / 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
- ExpressionNode.cs
- PerformanceCounterNameAttribute.cs
- AnimationTimeline.cs
- SafeNativeMethods.cs
- SQLBytesStorage.cs
- ThreadExceptionDialog.cs
- FontWeight.cs
- XmlFormatReaderGenerator.cs
- ResourceKey.cs
- Variable.cs
- XmlDesigner.cs
- DbConnectionPoolCounters.cs
- SmtpReplyReader.cs
- AppLevelCompilationSectionCache.cs
- SizeConverter.cs
- APCustomTypeDescriptor.cs
- WebServiceEnumData.cs
- BitmapImage.cs
- BitmapPalette.cs
- XmlUtil.cs
- URLIdentityPermission.cs
- TableStyle.cs
- ActivationArguments.cs
- SpanIndex.cs
- ColumnHeaderCollectionEditor.cs
- localization.cs
- Parameter.cs
- UniqueIdentifierService.cs
- _emptywebproxy.cs
- Merger.cs
- DataGridViewColumnEventArgs.cs
- Propagator.JoinPropagator.cs
- CacheMemory.cs
- TableLayoutPanelCellPosition.cs
- CacheRequest.cs
- ToolStripHighContrastRenderer.cs
- IdentitySection.cs
- QuaternionRotation3D.cs
- WindowsListViewScroll.cs
- UserControlCodeDomTreeGenerator.cs
- Grid.cs
- GridViewDeletedEventArgs.cs
- CheckBoxRenderer.cs
- BaseContextMenu.cs
- DbMetaDataCollectionNames.cs
- TextTreeDeleteContentUndoUnit.cs
- RequestCacheValidator.cs
- DataShape.cs
- ColorAnimation.cs
- FacetValueContainer.cs
- LinearQuaternionKeyFrame.cs
- SemanticTag.cs
- NotImplementedException.cs
- TdsParserHelperClasses.cs
- PopOutPanel.cs
- ErrorTableItemStyle.cs
- StyleModeStack.cs
- CFStream.cs
- StateDesigner.cs
- RowUpdatedEventArgs.cs
- GridViewColumnCollectionChangedEventArgs.cs
- HebrewNumber.cs
- SiteMapNodeItem.cs
- DropSource.cs
- StrongNamePublicKeyBlob.cs
- EntityCodeGenerator.cs
- sqlnorm.cs
- ACE.cs
- LockCookie.cs
- PageFunction.cs
- SelectionPattern.cs
- ParentQuery.cs
- StringResourceManager.cs
- HtmlShim.cs
- AnnouncementService.cs
- PageOutputQuality.cs
- TextWriterEngine.cs
- IPGlobalProperties.cs
- PublisherIdentityPermission.cs
- SimpleApplicationHost.cs
- Attribute.cs
- RegionInfo.cs
- SchemaElementDecl.cs
- GlyphCollection.cs
- Token.cs
- VBIdentifierTrimConverter.cs
- ControlCachePolicy.cs
- SmtpClient.cs
- SqlIdentifier.cs
- WindowsSecurityTokenAuthenticator.cs
- ParameterModifier.cs
- CommandConverter.cs
- WindowPattern.cs
- IProducerConsumerCollection.cs
- ListViewCancelEventArgs.cs
- DataServiceProviderWrapper.cs
- WebPartConnectVerb.cs
- ControlCachePolicy.cs
- KeyEventArgs.cs
- DataGridViewCellConverter.cs