Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / Configuration / LowerCaseStringConverter.cs / 1 / 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
- Screen.cs
- Knowncolors.cs
- LocalizabilityAttribute.cs
- CustomErrorCollection.cs
- ServiceDebugBehavior.cs
- UIntPtr.cs
- DescendantBaseQuery.cs
- HttpProfileBase.cs
- RSAPKCS1SignatureFormatter.cs
- Operators.cs
- AttributeCollection.cs
- HwndHost.cs
- RegexCompiler.cs
- ConstraintStruct.cs
- TargetConverter.cs
- SelectingProviderEventArgs.cs
- HScrollBar.cs
- StringUtil.cs
- ObjectViewListener.cs
- ToggleButton.cs
- SyntaxCheck.cs
- SafeFileMappingHandle.cs
- WebResourceAttribute.cs
- TreeNodeCollection.cs
- UnauthorizedAccessException.cs
- FixedSOMLineRanges.cs
- MessageAction.cs
- TagPrefixAttribute.cs
- UiaCoreTypesApi.cs
- DataErrorValidationRule.cs
- LogExtent.cs
- Win32Exception.cs
- VsPropertyGrid.cs
- NameValueConfigurationCollection.cs
- RelationshipEndCollection.cs
- RuntimeComponentFilter.cs
- Unit.cs
- TransactionException.cs
- COM2PictureConverter.cs
- CalendarModeChangedEventArgs.cs
- ClientScriptItem.cs
- GridView.cs
- CollectionChangeEventArgs.cs
- DelegateArgumentReference.cs
- BrowserCapabilitiesFactory35.cs
- ProgressBarAutomationPeer.cs
- ObjectStateFormatter.cs
- GeneralTransform3D.cs
- ThousandthOfEmRealDoubles.cs
- SwitchLevelAttribute.cs
- TypeUtil.cs
- AssemblyGen.cs
- WebServiceErrorEvent.cs
- GeometryValueSerializer.cs
- SqlIdentifier.cs
- ResourceContainer.cs
- FileDialogPermission.cs
- UnsafeNativeMethods.cs
- WebBrowserPermission.cs
- InteropAutomationProvider.cs
- DataControlImageButton.cs
- ConfigXmlAttribute.cs
- WindowsTitleBar.cs
- WorkItem.cs
- TransformerInfo.cs
- ExpressionConverter.cs
- SqlMethods.cs
- WindowsSlider.cs
- WebEvents.cs
- PerformanceCounterManager.cs
- SortFieldComparer.cs
- CompModSwitches.cs
- WebPartDisplayModeEventArgs.cs
- Set.cs
- SeverityFilter.cs
- AspNetPartialTrustHelpers.cs
- EncodingNLS.cs
- XmlRootAttribute.cs
- ToolStrip.cs
- Scene3D.cs
- BaseHashHelper.cs
- SettingsSavedEventArgs.cs
- MeasureItemEvent.cs
- Clock.cs
- IUnknownConstantAttribute.cs
- AuthenticatedStream.cs
- ClientTargetCollection.cs
- SplitterCancelEvent.cs
- ValidationPropertyAttribute.cs
- XmlSerializerNamespaces.cs
- log.cs
- StyleCollection.cs
- Part.cs
- SqlDataSourceFilteringEventArgs.cs
- NodeFunctions.cs
- WinHttpWebProxyFinder.cs
- ProfileSettingsCollection.cs
- VisualState.cs
- DeferredReference.cs
- DomainUpDown.cs