Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / LowerCaseStringConverter.cs / 1305376 / 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; 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; 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
- isolationinterop.cs
- StylusLogic.cs
- InputScope.cs
- ConnectionsZone.cs
- CodeTypeOfExpression.cs
- NamespaceInfo.cs
- IsolatedStorageFilePermission.cs
- LingerOption.cs
- NumberSubstitution.cs
- TraceSection.cs
- DbParameterHelper.cs
- TypeDependencyAttribute.cs
- FixUpCollection.cs
- ControlAdapter.cs
- AtlasWeb.Designer.cs
- SettingsSection.cs
- RuntimeConfig.cs
- ValidatorCompatibilityHelper.cs
- Point3D.cs
- WebControlsSection.cs
- isolationinterop.cs
- Profiler.cs
- CultureSpecificStringDictionary.cs
- StyleSheet.cs
- ActivationArguments.cs
- TextServicesDisplayAttributePropertyRanges.cs
- TextBoxRenderer.cs
- ModelItemExtensions.cs
- CategoryNameCollection.cs
- ISAPIWorkerRequest.cs
- PropertyReferenceSerializer.cs
- RuntimeResourceSet.cs
- Hex.cs
- UTF7Encoding.cs
- FacetEnabledSchemaElement.cs
- PropertyTab.cs
- StyleXamlParser.cs
- MediaElementAutomationPeer.cs
- DynamicResourceExtension.cs
- ZipIOExtraFieldPaddingElement.cs
- ExpressionEditorAttribute.cs
- FullTextState.cs
- AssemblyBuilder.cs
- XmlComment.cs
- FlowNode.cs
- DataGrid.cs
- SqlAliaser.cs
- ComponentResourceManager.cs
- SplineQuaternionKeyFrame.cs
- TextInfo.cs
- DockAndAnchorLayout.cs
- Highlights.cs
- QueryCacheEntry.cs
- ReferenceEqualityComparer.cs
- UnmanagedBitmapWrapper.cs
- ParentUndoUnit.cs
- SendMailErrorEventArgs.cs
- SymbolEqualComparer.cs
- GridViewDeletedEventArgs.cs
- MediaContext.cs
- XmlDownloadManager.cs
- CharacterBufferReference.cs
- MatrixTransform3D.cs
- ValidationErrorInfo.cs
- InfoCardServiceInstallComponent.cs
- DependencyPropertyValueSerializer.cs
- PropertyPathWorker.cs
- CalendarModeChangedEventArgs.cs
- TeredoHelper.cs
- ScriptResourceInfo.cs
- ChtmlTextWriter.cs
- DoubleStorage.cs
- ChtmlLinkAdapter.cs
- MessageSecurityOverHttpElement.cs
- EntityContainerEntitySetDefiningQuery.cs
- SignedXml.cs
- LiteralControl.cs
- WebSysDescriptionAttribute.cs
- SelectorItemAutomationPeer.cs
- CacheVirtualItemsEvent.cs
- MediaEntryAttribute.cs
- MessageSecurityOverHttp.cs
- ThicknessAnimationBase.cs
- ConfigurationManagerInternal.cs
- PasswordDeriveBytes.cs
- DeviceFiltersSection.cs
- iisPickupDirectory.cs
- XslTransform.cs
- ControlCommandSet.cs
- IPGlobalProperties.cs
- ToolBarButton.cs
- AmbientEnvironment.cs
- RtfToXamlReader.cs
- ListenerElementsCollection.cs
- FormsAuthenticationConfiguration.cs
- DiscreteKeyFrames.cs
- GroupedContextMenuStrip.cs
- DataObjectSettingDataEventArgs.cs
- Pkcs7Signer.cs
- CodeAttributeArgumentCollection.cs