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
- ContainerControl.cs
- ObfuscationAttribute.cs
- PeerService.cs
- DataRecordInternal.cs
- XmlEncodedRawTextWriter.cs
- MappingSource.cs
- WindowsListViewItemCheckBox.cs
- WrapPanel.cs
- PersonalizationEntry.cs
- InfoCard.cs
- EventWaitHandleSecurity.cs
- ImpersonateTokenRef.cs
- StatusBarAutomationPeer.cs
- BulletedListEventArgs.cs
- XhtmlBasicPhoneCallAdapter.cs
- NonParentingControl.cs
- ZoneIdentityPermission.cs
- _HelperAsyncResults.cs
- RsaElement.cs
- VSWCFServiceContractGenerator.cs
- SqlOuterApplyReducer.cs
- ToolStripDropDownClosedEventArgs.cs
- MultiPropertyDescriptorGridEntry.cs
- NativeMethods.cs
- HttpServerUtilityWrapper.cs
- SmtpException.cs
- ToolStripAdornerWindowService.cs
- UnsafeNativeMethods.cs
- Path.cs
- GetMemberBinder.cs
- ListViewItem.cs
- DataGridParentRows.cs
- DataGridColumnFloatingHeader.cs
- FixedElement.cs
- NamespaceList.cs
- BindingsSection.cs
- DataGridViewRowPrePaintEventArgs.cs
- TextTreeTextBlock.cs
- TypeValidationEventArgs.cs
- RawStylusInputReport.cs
- PerfCounterSection.cs
- SqlConnectionHelper.cs
- GlyphCollection.cs
- AddInAdapter.cs
- MediaSystem.cs
- GACIdentityPermission.cs
- XmlNodeList.cs
- RoutedUICommand.cs
- DocumentApplication.cs
- TreeViewAutomationPeer.cs
- TreeBuilderBamlTranslator.cs
- smtpconnection.cs
- IIS7WorkerRequest.cs
- Source.cs
- SlipBehavior.cs
- ContentDisposition.cs
- XPathDocumentNavigator.cs
- AdjustableArrowCap.cs
- Privilege.cs
- DataGridViewHitTestInfo.cs
- SecurityRuntime.cs
- CFStream.cs
- OverrideMode.cs
- ScrollContentPresenter.cs
- OdbcConnectionOpen.cs
- DataGrid.cs
- TextEditorSelection.cs
- RepeaterItemCollection.cs
- ClosableStream.cs
- DbProviderManifest.cs
- ContextQuery.cs
- ValuePattern.cs
- ProcessProtocolHandler.cs
- WebReferenceOptions.cs
- CodeDOMUtility.cs
- DocumentViewer.cs
- WsdlServiceChannelBuilder.cs
- BoolLiteral.cs
- WindowsRegion.cs
- StructuredType.cs
- AutomationAttributeInfo.cs
- IPEndPointCollection.cs
- StringSource.cs
- FormatterServices.cs
- HtmlInputFile.cs
- OptimisticConcurrencyException.cs
- ModulesEntry.cs
- DataColumnPropertyDescriptor.cs
- HierarchicalDataSourceControl.cs
- InternalSafeNativeMethods.cs
- Update.cs
- RawTextInputReport.cs
- ServiceObjectContainer.cs
- RedistVersionInfo.cs
- PropertyDescriptors.cs
- VirtualDirectoryMappingCollection.cs
- ImageBrush.cs
- PageAsyncTaskManager.cs
- Permission.cs
- Console.cs