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
- BridgeDataRecord.cs
- TemplateControlBuildProvider.cs
- Rules.cs
- FixedSOMTextRun.cs
- Helper.cs
- ModuleBuilderData.cs
- InputReferenceExpression.cs
- VariableAction.cs
- CommandConverter.cs
- WebPartEventArgs.cs
- CodeSubDirectoriesCollection.cs
- BuildResultCache.cs
- ToolStripPanelSelectionBehavior.cs
- UpdateTranslator.cs
- BaseCodePageEncoding.cs
- StringFormat.cs
- OdbcException.cs
- ScriptIgnoreAttribute.cs
- HttpModuleActionCollection.cs
- OletxEnlistment.cs
- xdrvalidator.cs
- HelpKeywordAttribute.cs
- LinkUtilities.cs
- AspNetHostingPermission.cs
- InheritanceContextHelper.cs
- OdbcParameterCollection.cs
- PointConverter.cs
- DataGridViewColumnHeaderCell.cs
- LineServicesRun.cs
- ProfileProvider.cs
- ScrollViewerAutomationPeer.cs
- QueryTask.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- OdbcStatementHandle.cs
- PostBackOptions.cs
- EdmItemCollection.OcAssemblyCache.cs
- Point3DAnimationUsingKeyFrames.cs
- ArraySortHelper.cs
- securestring.cs
- RoutedEventValueSerializer.cs
- IncrementalHitTester.cs
- ExpandButtonVisibilityConverter.cs
- CompositeControl.cs
- SpellerStatusTable.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- ValueExpressions.cs
- XPathNavigatorReader.cs
- SymDocumentType.cs
- XmlNotation.cs
- ACL.cs
- SafeNativeMethods.cs
- LinearKeyFrames.cs
- TeredoHelper.cs
- EditorZoneAutoFormat.cs
- SignedInfo.cs
- KeyProperty.cs
- initElementDictionary.cs
- UICuesEvent.cs
- Options.cs
- JoinGraph.cs
- DynamicRendererThreadManager.cs
- BinHexEncoder.cs
- SingleObjectCollection.cs
- EnumUnknown.cs
- TraceSwitch.cs
- LocalizabilityAttribute.cs
- ClientScriptItemCollection.cs
- ServiceBuildProvider.cs
- NativeMethods.cs
- FactoryMaker.cs
- SqlReferenceCollection.cs
- InvalidComObjectException.cs
- SocketCache.cs
- RuntimeHandles.cs
- HtmlInputRadioButton.cs
- SecurityContext.cs
- SqlMetaData.cs
- ToolStripGripRenderEventArgs.cs
- InternalConfigEventArgs.cs
- SqlGatherProducedAliases.cs
- MsmqAppDomainProtocolHandler.cs
- peernodestatemanager.cs
- InternalRelationshipCollection.cs
- XmlSchemaSimpleTypeUnion.cs
- TerminateSequenceResponse.cs
- ServiceChannel.cs
- DropDownHolder.cs
- CombinedGeometry.cs
- FormViewPageEventArgs.cs
- EdmMember.cs
- Point3DConverter.cs
- ModelChangedEventArgsImpl.cs
- IgnoreFileBuildProvider.cs
- HttpPostProtocolReflector.cs
- ConsoleCancelEventArgs.cs
- ExitEventArgs.cs
- UInt16Converter.cs
- TreePrinter.cs
- CollectionBase.cs
- ValueUtilsSmi.cs