Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DatagridviewDisplayedBandsData.cs
- BamlWriter.cs
- CustomPopupPlacement.cs
- ChangeTracker.cs
- MSAAWinEventWrap.cs
- RuleAttributes.cs
- AssemblyNameProxy.cs
- DataRowChangeEvent.cs
- DelayedRegex.cs
- RelatedView.cs
- SHA1CryptoServiceProvider.cs
- SoapMessage.cs
- DataColumnMappingCollection.cs
- ClipboardProcessor.cs
- SequenceNumber.cs
- Debug.cs
- OutputCacheSettingsSection.cs
- Memoizer.cs
- TextEmbeddedObject.cs
- ToolStripDropDownItemDesigner.cs
- NetStream.cs
- PolicyLevel.cs
- ScriptComponentDescriptor.cs
- Stack.cs
- ToolboxItemCollection.cs
- SimpleExpression.cs
- ManifestSignatureInformation.cs
- CancellableEnumerable.cs
- SiteOfOriginContainer.cs
- ProcessModelInfo.cs
- GridViewCancelEditEventArgs.cs
- ToolStripButton.cs
- SpeakInfo.cs
- BindingCompleteEventArgs.cs
- SemanticBasicElement.cs
- EmptyStringExpandableObjectConverter.cs
- FtpRequestCacheValidator.cs
- HwndProxyElementProvider.cs
- ProgressiveCrcCalculatingStream.cs
- ProfileBuildProvider.cs
- PackageProperties.cs
- Point3DCollectionValueSerializer.cs
- MethodCallConverter.cs
- SecurityAlgorithmSuite.cs
- ImportFileRequest.cs
- NonSerializedAttribute.cs
- AppSettingsExpressionBuilder.cs
- FilterElement.cs
- CommonGetThemePartSize.cs
- TrackingStringDictionary.cs
- FacetDescriptionElement.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- ModelPropertyCollectionImpl.cs
- Item.cs
- XmlWhitespace.cs
- KeyboardDevice.cs
- SmtpClient.cs
- EventMappingSettings.cs
- StatusBar.cs
- AnnotationHelper.cs
- DataListComponentEditor.cs
- TextEditorSpelling.cs
- TriState.cs
- CharacterBufferReference.cs
- BitmapDownload.cs
- StoreAnnotationsMap.cs
- SynchronizationLockException.cs
- DataSourceCache.cs
- TextEffect.cs
- PhysicalAddress.cs
- ValidationRuleCollection.cs
- ExpandCollapsePattern.cs
- BulletChrome.cs
- RepeaterItemEventArgs.cs
- TextShapeableCharacters.cs
- TypeListConverter.cs
- Comparer.cs
- BitmapSource.cs
- TemplateBindingExpressionConverter.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- DiagnosticStrings.cs
- ArithmeticException.cs
- DispatcherHookEventArgs.cs
- LocalizationCodeDomSerializer.cs
- UpdatePanel.cs
- ObjectToken.cs
- UpdateCompiler.cs
- ProgressBarRenderer.cs
- OdbcEnvironment.cs
- ContentPlaceHolder.cs
- WebPartVerbsEventArgs.cs
- EventListener.cs
- WinEventHandler.cs
- ApplicationTrust.cs
- StringValidatorAttribute.cs
- NotFiniteNumberException.cs
- DoubleCollection.cs
- XmlDataContract.cs
- SettingsProperty.cs
- CachedFontFamily.cs