Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Configuration / LowerCaseStringConverter.cs / 2 / 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. //------------------------------------------------------------------------------ // // 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlParser.cs
- ButtonChrome.cs
- AutomationPeer.cs
- WebDisplayNameAttribute.cs
- IdentityHolder.cs
- BufferedReadStream.cs
- XmlAttributeProperties.cs
- HyperlinkAutomationPeer.cs
- SliderAutomationPeer.cs
- StateInitialization.cs
- VirtualizedItemPattern.cs
- AuthenticateEventArgs.cs
- HtmlGenericControl.cs
- FillRuleValidation.cs
- TreeChangeInfo.cs
- RootBrowserWindowAutomationPeer.cs
- BaseResourcesBuildProvider.cs
- ArrayItemValue.cs
- SettingsPropertyValue.cs
- BufferedGraphicsContext.cs
- RawStylusInputCustomData.cs
- DbBuffer.cs
- SessionEndingCancelEventArgs.cs
- LogicalExpressionTypeConverter.cs
- Deserializer.cs
- Timer.cs
- MethodExpression.cs
- LayoutTable.cs
- DataControlFieldCell.cs
- HttpWebResponse.cs
- CrossSiteScriptingValidation.cs
- JoinTreeSlot.cs
- NamespaceCollection.cs
- GlyphRun.cs
- PageAsyncTask.cs
- ProtocolElementCollection.cs
- altserialization.cs
- DispatcherOperation.cs
- FontStretches.cs
- GeometryDrawing.cs
- SelectionListComponentEditor.cs
- NetworkInformationException.cs
- SemaphoreFullException.cs
- Util.cs
- IResourceProvider.cs
- TextRunCache.cs
- DataTableClearEvent.cs
- SqlBulkCopyColumnMappingCollection.cs
- UIAgentAsyncEndRequest.cs
- HotSpotCollection.cs
- StreamAsIStream.cs
- PrinterUnitConvert.cs
- EventWaitHandle.cs
- AsyncStreamReader.cs
- BooleanProjectedSlot.cs
- XmlTextWriter.cs
- COM2PropertyPageUITypeConverter.cs
- FastEncoder.cs
- ThreadAttributes.cs
- DaylightTime.cs
- UniqueIdentifierService.cs
- SolidColorBrush.cs
- OdbcEnvironmentHandle.cs
- OdbcCommand.cs
- SingleSelectRootGridEntry.cs
- StrongNameMembershipCondition.cs
- DynamicMethod.cs
- RoutedEventValueSerializer.cs
- Condition.cs
- ConcatQueryOperator.cs
- DeferredTextReference.cs
- XmlSerializerAssemblyAttribute.cs
- TemplateComponentConnector.cs
- AsymmetricKeyExchangeFormatter.cs
- ScriptControlManager.cs
- RuntimeHandles.cs
- PathParser.cs
- UrlMappingsSection.cs
- TextContainerChangeEventArgs.cs
- GenericRootAutomationPeer.cs
- bidPrivateBase.cs
- DocumentGrid.cs
- TagPrefixCollection.cs
- SendOperation.cs
- DataProviderNameConverter.cs
- RoutingEndpointTrait.cs
- AQNBuilder.cs
- SignatureToken.cs
- FacetValueContainer.cs
- XmlNullResolver.cs
- DetailsViewDeletedEventArgs.cs
- StoragePropertyMapping.cs
- ExpressionNode.cs
- DynamicQueryStringParameter.cs
- DataReceivedEventArgs.cs
- SubMenuStyle.cs
- safelink.cs
- AttributeEmitter.cs
- WorkflowServiceHost.cs
- KeyGestureConverter.cs