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
- ISAPIRuntime.cs
- EntityDataSource.cs
- OpenTypeMethods.cs
- SqlWebEventProvider.cs
- RoleManagerModule.cs
- TableChangeProcessor.cs
- UserMapPath.cs
- Margins.cs
- HtmlInputImage.cs
- InputScope.cs
- Environment.cs
- DataServiceHost.cs
- WinCategoryAttribute.cs
- ConvertTextFrag.cs
- LoginCancelEventArgs.cs
- TypeForwardedToAttribute.cs
- ToolStripControlHost.cs
- BasicViewGenerator.cs
- ConfigurationConverterBase.cs
- OrderByQueryOptionExpression.cs
- ImmutablePropertyDescriptorGridEntry.cs
- NodeLabelEditEvent.cs
- ArithmeticException.cs
- JpegBitmapDecoder.cs
- ConfigXmlWhitespace.cs
- UriWriter.cs
- AssemblyResourceLoader.cs
- linebase.cs
- HtmlUtf8RawTextWriter.cs
- TileBrush.cs
- SchemaElementLookUpTable.cs
- MultipleFilterMatchesException.cs
- CapabilitiesAssignment.cs
- RuntimeArgumentHandle.cs
- DataGridViewCheckBoxColumn.cs
- Typeface.cs
- CatalogZone.cs
- ProcessThreadDesigner.cs
- SizeChangedEventArgs.cs
- XmlSerializer.cs
- EmbeddedObject.cs
- ControlBindingsConverter.cs
- KeyBinding.cs
- EventMappingSettingsCollection.cs
- DataGridViewCellLinkedList.cs
- SerializeAbsoluteContext.cs
- SerializerProvider.cs
- TextDecorationCollectionConverter.cs
- EncryptedData.cs
- Pens.cs
- CharEnumerator.cs
- SiteMapSection.cs
- LiteralTextParser.cs
- NumberAction.cs
- CatchBlock.cs
- SortAction.cs
- DataAdapter.cs
- LostFocusEventManager.cs
- SigningCredentials.cs
- NotificationContext.cs
- ObjectQueryExecutionPlan.cs
- TypedColumnHandler.cs
- ContextMenuAutomationPeer.cs
- TreeNodeBinding.cs
- WmlValidatorAdapter.cs
- DiscoveryOperationContextExtension.cs
- AttributeUsageAttribute.cs
- Typography.cs
- Helpers.cs
- UserInitiatedRoutedEventPermission.cs
- ICollection.cs
- UnsafeNativeMethods.cs
- ClientConfigurationSystem.cs
- SortedDictionary.cs
- DataGridViewDataErrorEventArgs.cs
- ContextMenuAutomationPeer.cs
- ListBox.cs
- SqlNamer.cs
- NativeActivity.cs
- AssemblyFilter.cs
- FaultBookmark.cs
- DataListCommandEventArgs.cs
- SecurityUtils.cs
- TimeoutHelper.cs
- AssociationSetMetadata.cs
- Ref.cs
- NodeFunctions.cs
- DynamicILGenerator.cs
- XsltInput.cs
- ToolStripHighContrastRenderer.cs
- DesignerSerializationVisibilityAttribute.cs
- FontClient.cs
- WindowsIPAddress.cs
- Point4D.cs
- Int16AnimationUsingKeyFrames.cs
- XmlSerializerNamespaces.cs
- CompModSwitches.cs
- PopupRoot.cs
- OleStrCAMarshaler.cs
- SymLanguageType.cs