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
- InternalEnumValidator.cs
- MemoryFailPoint.cs
- SqlRowUpdatedEvent.cs
- Literal.cs
- EntityTransaction.cs
- ModuleElement.cs
- CodeExpressionCollection.cs
- DBDataPermission.cs
- ChtmlTextWriter.cs
- BaseResourcesBuildProvider.cs
- ExpressionNormalizer.cs
- FormatterConverter.cs
- SystemIPInterfaceStatistics.cs
- MergeFailedEvent.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- HtmlTableRowCollection.cs
- GcSettings.cs
- XamlParser.cs
- Rect3DConverter.cs
- SchemaManager.cs
- HttpModuleActionCollection.cs
- TemplateLookupAction.cs
- TextDecorationCollection.cs
- BindingCollection.cs
- CompressedStack.cs
- XmlSchemaSearchPattern.cs
- SaveRecipientRequest.cs
- WebMessageEncoderFactory.cs
- HtmlInputPassword.cs
- DesignTimeValidationFeature.cs
- UnsafeNativeMethods.cs
- DatatypeImplementation.cs
- ForceCopyBuildProvider.cs
- Attributes.cs
- WorkflowInstanceProvider.cs
- CodeAccessSecurityEngine.cs
- WebPartRestoreVerb.cs
- WindowsListViewGroup.cs
- RNGCryptoServiceProvider.cs
- SqlCacheDependency.cs
- TypeGeneratedEventArgs.cs
- TextRange.cs
- AssemblySettingAttributes.cs
- StringInfo.cs
- QuaternionAnimation.cs
- LostFocusEventManager.cs
- AuthenticationConfig.cs
- HttpRequest.cs
- TabPage.cs
- GAC.cs
- ListViewPagedDataSource.cs
- GenericsInstances.cs
- XmlLoader.cs
- ToolStripDropDownItem.cs
- CallContext.cs
- SmiEventSink_Default.cs
- SmtpMail.cs
- ConditionalBranch.cs
- Int64.cs
- DetailsView.cs
- ByteStorage.cs
- ReachNamespaceInfo.cs
- FilterException.cs
- Positioning.cs
- OracleNumber.cs
- HitTestWithPointDrawingContextWalker.cs
- ControlCachePolicy.cs
- XmlCompatibilityReader.cs
- TemplateBindingExtension.cs
- ToolboxItemWrapper.cs
- UshortList2.cs
- RequestStatusBarUpdateEventArgs.cs
- SizeKeyFrameCollection.cs
- QuaternionIndependentAnimationStorage.cs
- ButtonBaseAdapter.cs
- UIPermission.cs
- InternalTypeHelper.cs
- TripleDESCryptoServiceProvider.cs
- ColumnMapVisitor.cs
- SynchronizationContext.cs
- XmlSchemaAnnotated.cs
- MessageSecurityOverMsmqElement.cs
- XPathNodeInfoAtom.cs
- Set.cs
- Int32Converter.cs
- ADMembershipUser.cs
- HttpStreamMessage.cs
- AbstractSvcMapFileLoader.cs
- ContentControl.cs
- Attributes.cs
- DataGridViewCellFormattingEventArgs.cs
- HScrollProperties.cs
- FunctionDescription.cs
- IDispatchConstantAttribute.cs
- ConfigXmlWhitespace.cs
- PreviewControlDesigner.cs
- BindingCompleteEventArgs.cs
- CollectionBuilder.cs
- GridProviderWrapper.cs
- PlaceHolder.cs