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
- SqlUDTStorage.cs
- SafeFileMapViewHandle.cs
- MultilineStringEditor.cs
- GridViewSelectEventArgs.cs
- DatePickerTextBox.cs
- AbandonedMutexException.cs
- XmlRawWriter.cs
- COM2PictureConverter.cs
- SmtpAuthenticationManager.cs
- XmlAtomicValue.cs
- DebugInfoGenerator.cs
- XmlTextReaderImpl.cs
- PieceNameHelper.cs
- Variant.cs
- QueryExecutionOption.cs
- DataSourceCache.cs
- ToolStripSeparator.cs
- _AutoWebProxyScriptWrapper.cs
- PageCatalogPartDesigner.cs
- OptimizedTemplateContent.cs
- CustomPopupPlacement.cs
- Registry.cs
- EpmSourcePathSegment.cs
- SkewTransform.cs
- Pts.cs
- AggregatePushdown.cs
- PagesSection.cs
- AQNBuilder.cs
- IndexerNameAttribute.cs
- ExternalException.cs
- WebBaseEventKeyComparer.cs
- List.cs
- Conditional.cs
- DataSourceConverter.cs
- AnnotationAdorner.cs
- MiniAssembly.cs
- BitmapFrame.cs
- CodeGeneratorOptions.cs
- ApplicationServicesHostFactory.cs
- ContentFilePart.cs
- FixedPageStructure.cs
- RequestedSignatureDialog.cs
- DescendentsWalker.cs
- DbConnectionPoolGroup.cs
- XmlSerializationGeneratedCode.cs
- SystemResourceHost.cs
- X509SecurityTokenProvider.cs
- InvalidOperationException.cs
- XmlHierarchicalDataSourceView.cs
- ClientFormsIdentity.cs
- ActivityLocationReferenceEnvironment.cs
- RsaSecurityKey.cs
- QueryInterceptorAttribute.cs
- XmlArrayItemAttribute.cs
- EntityTypeEmitter.cs
- EnumType.cs
- ComboBox.cs
- IList.cs
- BrowserTree.cs
- SchemaLookupTable.cs
- ListBoxItemWrapperAutomationPeer.cs
- DataShape.cs
- ObservableDictionary.cs
- SqlTrackingQuery.cs
- HideDisabledControlAdapter.cs
- SafeThreadHandle.cs
- DataSysAttribute.cs
- exports.cs
- NamespaceInfo.cs
- MsmqDiagnostics.cs
- ToolStripItemImageRenderEventArgs.cs
- StreamGeometry.cs
- assertwrapper.cs
- SchemaElementLookUpTableEnumerator.cs
- DataGridColumnReorderingEventArgs.cs
- Token.cs
- RowToFieldTransformer.cs
- WorkerRequest.cs
- CapabilitiesState.cs
- BufferedWebEventProvider.cs
- EntitySetBaseCollection.cs
- Sentence.cs
- EntityReference.cs
- RawKeyboardInputReport.cs
- XmlEventCache.cs
- CodeThrowExceptionStatement.cs
- DataTemplate.cs
- Viewport3DVisual.cs
- httpserverutility.cs
- RelationshipDetailsRow.cs
- SortExpressionBuilder.cs
- HostProtectionException.cs
- NonParentingControl.cs
- DataGrid.cs
- TableSectionStyle.cs
- TypedOperationInfo.cs
- MetadataExchangeClient.cs
- ServerValidateEventArgs.cs
- SmtpCommands.cs
- ConfigurationStrings.cs