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
- Converter.cs
- WindowsFont.cs
- ZoneLinkButton.cs
- SqlDataSourceParameterParser.cs
- ControlCollection.cs
- Convert.cs
- SSmlParser.cs
- SchemaTableOptionalColumn.cs
- SizeConverter.cs
- ProfileSection.cs
- SQLInt32Storage.cs
- ObjectDataSourceView.cs
- TemplateControlBuildProvider.cs
- MemberHolder.cs
- GeneralTransform2DTo3D.cs
- PropertyDescriptorComparer.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- CodeTypeParameterCollection.cs
- GridViewSortEventArgs.cs
- UserNameSecurityTokenAuthenticator.cs
- CellQuery.cs
- StructuredProperty.cs
- XmlBinaryWriterSession.cs
- ProxyManager.cs
- RelatedCurrencyManager.cs
- ExecutionContext.cs
- Figure.cs
- SchemaImporterExtensionElementCollection.cs
- ParameterToken.cs
- HotSpotCollection.cs
- SafeNativeMethods.cs
- CmsUtils.cs
- Attributes.cs
- EntityStoreSchemaFilterEntry.cs
- GPStream.cs
- IndexOutOfRangeException.cs
- FastEncoderWindow.cs
- JoinTreeNode.cs
- CatalogZoneBase.cs
- AccessControlList.cs
- XmlSchemaAppInfo.cs
- sapiproxy.cs
- FormatConvertedBitmap.cs
- Thickness.cs
- TableDetailsRow.cs
- SQLUtility.cs
- NegatedCellConstant.cs
- TextEndOfParagraph.cs
- ThicknessKeyFrameCollection.cs
- TextBoxBase.cs
- safesecurityhelperavalon.cs
- DrawingContextDrawingContextWalker.cs
- ViewBox.cs
- BlobPersonalizationState.cs
- AncestorChangedEventArgs.cs
- Resources.Designer.cs
- ToolboxItemFilterAttribute.cs
- WebPartZoneCollection.cs
- TimeManager.cs
- DataGridViewDataConnection.cs
- WebPartsPersonalization.cs
- SQLStringStorage.cs
- DesignBindingEditor.cs
- RawStylusInputCustomData.cs
- xmlglyphRunInfo.cs
- SqlStream.cs
- DataGridViewRowCancelEventArgs.cs
- MasterPageCodeDomTreeGenerator.cs
- DecoderReplacementFallback.cs
- RunClient.cs
- BooleanExpr.cs
- PackagePart.cs
- messageonlyhwndwrapper.cs
- SspiWrapper.cs
- Image.cs
- SizeValueSerializer.cs
- ActivityDesignerHelper.cs
- AppearanceEditorPart.cs
- AssemblyAttributes.cs
- ClonableStack.cs
- PartialTrustHelpers.cs
- MsmqInputSessionChannel.cs
- PropertyHelper.cs
- SoapFormatExtensions.cs
- ObjectCloneHelper.cs
- RootContext.cs
- XmlSerializerSection.cs
- HMACSHA384.cs
- XMLSchema.cs
- DynamicILGenerator.cs
- DynamicActionMessageFilter.cs
- TableLayoutColumnStyleCollection.cs
- EnvelopedSignatureTransform.cs
- AspProxy.cs
- TextEditorThreadLocalStore.cs
- SessionPageStateSection.cs
- PropertyValue.cs
- HasCopySemanticsAttribute.cs
- ChannelManagerBase.cs
- DPTypeDescriptorContext.cs