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
- OleAutBinder.cs
- SynchronousChannel.cs
- WebBrowserPermission.cs
- SQLMembershipProvider.cs
- Typeface.cs
- ModifierKeysConverter.cs
- BamlRecordHelper.cs
- CryptoStream.cs
- SmiXetterAccessMap.cs
- BlockUIContainer.cs
- Boolean.cs
- ExpandableObjectConverter.cs
- InvalidEnumArgumentException.cs
- AdPostCacheSubstitution.cs
- SchemaSetCompiler.cs
- FastPropertyAccessor.cs
- QueryRewriter.cs
- TiffBitmapEncoder.cs
- ParameterCollection.cs
- MenuItemBindingCollection.cs
- SiteMapDataSource.cs
- DesignerToolStripControlHost.cs
- entitydatasourceentitysetnameconverter.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- APCustomTypeDescriptor.cs
- ArrangedElementCollection.cs
- UserNameSecurityToken.cs
- TreeNodeBinding.cs
- EntityViewGenerator.cs
- ExcludePathInfo.cs
- EditCommandColumn.cs
- SynchronizationFilter.cs
- ChannelServices.cs
- Rect.cs
- DesignerObjectListAdapter.cs
- SoapElementAttribute.cs
- PrinterSettings.cs
- Keywords.cs
- WindowsRichEditRange.cs
- GreenMethods.cs
- ScrollViewerAutomationPeer.cs
- ItemList.cs
- exports.cs
- WebPartTransformerCollection.cs
- RowBinding.cs
- AssociationSetEnd.cs
- ItemChangedEventArgs.cs
- ToolStripSplitButton.cs
- NativeCompoundFileAPIs.cs
- HMACSHA1.cs
- EventSinkActivity.cs
- TagPrefixInfo.cs
- ExtentKey.cs
- SnapLine.cs
- LZCodec.cs
- HostingEnvironment.cs
- EditorPartChrome.cs
- ConfigPathUtility.cs
- HwndStylusInputProvider.cs
- ProfileSection.cs
- DataPagerFieldCommandEventArgs.cs
- SrgsElementFactory.cs
- TimeSpanFormat.cs
- MachineKeyValidationConverter.cs
- DiscoveryClientBindingElement.cs
- ConfigurationManager.cs
- EncodingFallbackAwareXmlTextWriter.cs
- BinaryObjectWriter.cs
- ExternalException.cs
- DescendentsWalker.cs
- TextOnlyOutput.cs
- XamlWriter.cs
- XmlAttributeCollection.cs
- PipeStream.cs
- Pts.cs
- Pkcs9Attribute.cs
- XhtmlMobileTextWriter.cs
- RightsManagementPermission.cs
- ParameterSubsegment.cs
- TextRange.cs
- UriSectionReader.cs
- unsafenativemethodsother.cs
- ZipIOExtraFieldPaddingElement.cs
- DataGridViewComponentPropertyGridSite.cs
- CodeSnippetExpression.cs
- DataGridViewCellValidatingEventArgs.cs
- OledbConnectionStringbuilder.cs
- ColumnReorderedEventArgs.cs
- WebDescriptionAttribute.cs
- SQLBinary.cs
- MultipartContentParser.cs
- XmlNodeChangedEventManager.cs
- DictionarySectionHandler.cs
- SoapHeader.cs
- Resources.Designer.cs
- _Events.cs
- IdentifierCollection.cs
- PathFigureCollectionConverter.cs
- PermissionListSet.cs
- GetBrowserTokenRequest.cs