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
- SocketAddress.cs
- DragDropHelper.cs
- ReachDocumentReferenceCollectionSerializer.cs
- ProfilePropertySettingsCollection.cs
- MessageQueue.cs
- ProtocolsConfigurationEntry.cs
- ColumnTypeConverter.cs
- FamilyTypefaceCollection.cs
- FileIOPermission.cs
- ScriptingRoleServiceSection.cs
- Adorner.cs
- PackagePartCollection.cs
- ClonableStack.cs
- DataServiceQueryOfT.cs
- BuildResultCache.cs
- ToolStripPanelDesigner.cs
- SafeRightsManagementPubHandle.cs
- UrlMappingsSection.cs
- DesignConnectionCollection.cs
- Wildcard.cs
- ContentControl.cs
- CompoundFileStreamReference.cs
- SafeFindHandle.cs
- LinqToSqlWrapper.cs
- Transactions.cs
- shaper.cs
- XPathBinder.cs
- RenderCapability.cs
- CategoryNameCollection.cs
- XamlRtfConverter.cs
- OneOfElement.cs
- CollectionEditor.cs
- LogicalMethodInfo.cs
- ProcessHostMapPath.cs
- HttpModulesSection.cs
- ActiveXHost.cs
- TransportConfigurationTypeElement.cs
- DragDropManager.cs
- ImageMapEventArgs.cs
- BinaryFormatterWriter.cs
- Transform3D.cs
- MetabaseServerConfig.cs
- HtmlTableCellCollection.cs
- AbandonedMutexException.cs
- CodeTypeDeclarationCollection.cs
- OperandQuery.cs
- HttpResponseInternalWrapper.cs
- ProxyWebPartConnectionCollection.cs
- CurrencyWrapper.cs
- _Events.cs
- ExtensionSimplifierMarkupObject.cs
- DefaultBinder.cs
- DPAPIProtectedConfigurationProvider.cs
- AbstractDataSvcMapFileLoader.cs
- BehaviorService.cs
- SignerInfo.cs
- PointAnimationUsingKeyFrames.cs
- Brush.cs
- ModelFunction.cs
- DataObjectCopyingEventArgs.cs
- TreeNodeCollection.cs
- MailFileEditor.cs
- ImageFormatConverter.cs
- FixedSOMTable.cs
- UTF32Encoding.cs
- OrderByExpression.cs
- InfoCardProofToken.cs
- WebPartsPersonalizationAuthorization.cs
- Group.cs
- OrthographicCamera.cs
- CompilerErrorCollection.cs
- DesignerSerializationManager.cs
- RuntimeHelpers.cs
- EnumerableValidator.cs
- RSAOAEPKeyExchangeFormatter.cs
- TransformPattern.cs
- ListControlConvertEventArgs.cs
- QueuePathEditor.cs
- ValidationSummary.cs
- HttpHandlerActionCollection.cs
- FileChangesMonitor.cs
- ActivityDesignerAccessibleObject.cs
- LazyTextWriterCreator.cs
- VersionedStreamOwner.cs
- WebPartDisplayModeCollection.cs
- SoapParser.cs
- ListBindableAttribute.cs
- SQLBoolean.cs
- Vector3DValueSerializer.cs
- SubclassTypeValidatorAttribute.cs
- Vector3DValueSerializer.cs
- MissingManifestResourceException.cs
- RelationshipConverter.cs
- WorkflowServiceNamespace.cs
- IFormattable.cs
- TaskFactory.cs
- TraceLevelHelper.cs
- _HTTPDateParse.cs
- UrlPath.cs
- HelpInfo.cs