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
- DataGridViewTextBoxColumn.cs
- TransformedBitmap.cs
- RijndaelCryptoServiceProvider.cs
- MenuItem.cs
- DirectoryObjectSecurity.cs
- WindowsSlider.cs
- DesignerAdapterAttribute.cs
- SelectedGridItemChangedEvent.cs
- listitem.cs
- DataGridViewCellConverter.cs
- DataObjectEventArgs.cs
- StylusButtonEventArgs.cs
- PropertyInformation.cs
- TypeConstant.cs
- ObjectQuery.cs
- ReadonlyMessageFilter.cs
- SchemaTableColumn.cs
- streamingZipPartStream.cs
- HostExecutionContextManager.cs
- TextFormatter.cs
- XmlElementAttribute.cs
- PathFigureCollectionConverter.cs
- WorkflowTransactionService.cs
- SimpleLine.cs
- RelationshipDetailsCollection.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- RetrieveVirtualItemEventArgs.cs
- CodeBinaryOperatorExpression.cs
- XmlIlTypeHelper.cs
- MetadataHelper.cs
- InvokeWebServiceDesigner.cs
- ComponentResourceManager.cs
- TypeExtension.cs
- GlobalEventManager.cs
- RelationshipDetailsRow.cs
- PopupEventArgs.cs
- ReadingWritingEntityEventArgs.cs
- NetworkAddressChange.cs
- DataGridViewTopRowAccessibleObject.cs
- InvokeAction.cs
- ColumnHeader.cs
- CryptoHandle.cs
- OpenTypeCommon.cs
- CodeComment.cs
- ClientFormsAuthenticationCredentials.cs
- CodeAttributeArgumentCollection.cs
- Grid.cs
- DataBindingCollectionEditor.cs
- BooleanKeyFrameCollection.cs
- DataKeyPropertyAttribute.cs
- BaseParser.cs
- Transform3DGroup.cs
- KeyGestureValueSerializer.cs
- RectangleF.cs
- CodeCompiler.cs
- ToolBarOverflowPanel.cs
- FixedHyperLink.cs
- MiniMapControl.xaml.cs
- DockingAttribute.cs
- RSAPKCS1KeyExchangeFormatter.cs
- TextEncodedRawTextWriter.cs
- WebPartEditorApplyVerb.cs
- PasswordRecovery.cs
- RC2.cs
- RegexStringValidatorAttribute.cs
- SystemEvents.cs
- OdbcPermission.cs
- OptimalTextSource.cs
- ErrorStyle.cs
- ExeConfigurationFileMap.cs
- HtmlTernaryTree.cs
- PreProcessInputEventArgs.cs
- CatchDesigner.xaml.cs
- SystemDropShadowChrome.cs
- StylusCaptureWithinProperty.cs
- TreeNodeCollection.cs
- Dispatcher.cs
- HtmlControlPersistable.cs
- CommandLineParser.cs
- ToolStripArrowRenderEventArgs.cs
- SetStateEventArgs.cs
- AnnotationHelper.cs
- FileDataSourceCache.cs
- ToolStrip.cs
- SegmentInfo.cs
- XmlSchemas.cs
- CaseInsensitiveComparer.cs
- ColumnResizeAdorner.cs
- XmlSignatureProperties.cs
- TextTreePropertyUndoUnit.cs
- InternalCache.cs
- ThreadPool.cs
- XmlNodeReader.cs
- PersonalizationProviderCollection.cs
- FunctionQuery.cs
- DbModificationClause.cs
- VisualTreeUtils.cs
- EpmSyndicationContentSerializer.cs
- TargetControlTypeCache.cs
- TextContainer.cs