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
- IndentTextWriter.cs
- LogReservationCollection.cs
- XmlAttributeCollection.cs
- MarkerProperties.cs
- StrokeNode.cs
- sqlpipe.cs
- MultiView.cs
- TextModifier.cs
- ACE.cs
- NominalTypeEliminator.cs
- MessageSecurityVersionConverter.cs
- RuntimeHelpers.cs
- NonVisualControlAttribute.cs
- UserControlBuildProvider.cs
- SqlTypesSchemaImporter.cs
- SingleObjectCollection.cs
- Substitution.cs
- SspiNegotiationTokenAuthenticatorState.cs
- AssemblyCollection.cs
- DependencyObject.cs
- DataGridTextColumn.cs
- XmlBufferReader.cs
- _PooledStream.cs
- OdbcUtils.cs
- WorkflowRuntimeServiceElement.cs
- ArraySet.cs
- TypeBrowser.xaml.cs
- PageBuildProvider.cs
- Point4D.cs
- PersistChildrenAttribute.cs
- TreeWalker.cs
- ViewManagerAttribute.cs
- ComponentCommands.cs
- PageRanges.cs
- HostingMessageProperty.cs
- DocComment.cs
- TemplateKey.cs
- DesignSurfaceManager.cs
- ChannelSinkStacks.cs
- ConfigXmlSignificantWhitespace.cs
- MDIClient.cs
- PermissionSet.cs
- BitmapEffectInputData.cs
- EventSourceCreationData.cs
- TaskHelper.cs
- XmlSchemaSet.cs
- XmlSchemaInclude.cs
- NumericUpDownAccelerationCollection.cs
- WebPartVerb.cs
- XmlFormatExtensionPointAttribute.cs
- TraceContext.cs
- XmlNamespaceManager.cs
- ResourceFallbackManager.cs
- TypeGenericEnumerableViewSchema.cs
- GraphicsContainer.cs
- CompilerGlobalScopeAttribute.cs
- OracleSqlParser.cs
- DBBindings.cs
- TransformPatternIdentifiers.cs
- HttpSocketManager.cs
- WebAdminConfigurationHelper.cs
- SecureUICommand.cs
- TrustLevelCollection.cs
- BorderSidesEditor.cs
- MimeTypeMapper.cs
- PageSetupDialog.cs
- AuthenticationServiceManager.cs
- RedistVersionInfo.cs
- ToolStripSeparatorRenderEventArgs.cs
- PassportAuthentication.cs
- ConfigXmlDocument.cs
- Tuple.cs
- ModelUIElement3D.cs
- OrderedEnumerableRowCollection.cs
- WebPartTracker.cs
- RepeaterItemCollection.cs
- KeyboardEventArgs.cs
- WebPartsPersonalization.cs
- CalendarButton.cs
- MemberRelationshipService.cs
- TemplateBindingExpression.cs
- XmlLinkedNode.cs
- DeploymentSection.cs
- OptimalTextSource.cs
- EarlyBoundInfo.cs
- MetaData.cs
- EditorZoneBase.cs
- IndexOutOfRangeException.cs
- NegatedConstant.cs
- TraceContextRecord.cs
- DictionaryContent.cs
- ScrollBar.cs
- ExpressionVisitorHelpers.cs
- TabPage.cs
- CannotUnloadAppDomainException.cs
- ContextConfiguration.cs
- TypeResolvingOptions.cs
- ApplicationDirectory.cs
- EntityDataSourceValidationException.cs
- AssociationType.cs