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
- FixedLineResult.cs
- Faults.cs
- Selection.cs
- AudioSignalProblemOccurredEventArgs.cs
- WpfXamlMember.cs
- GCHandleCookieTable.cs
- SrgsSubset.cs
- XamlFilter.cs
- ExtendedPropertyDescriptor.cs
- PermissionRequestEvidence.cs
- SaveWorkflowCommand.cs
- ManipulationDelta.cs
- Helpers.cs
- Aes.cs
- FixedTextPointer.cs
- TransformProviderWrapper.cs
- EmptyReadOnlyDictionaryInternal.cs
- EditorPartDesigner.cs
- EdmSchemaAttribute.cs
- ParagraphVisual.cs
- StringBuilder.cs
- DataGridAddNewRow.cs
- BodyGlyph.cs
- securitycriticaldata.cs
- ColorConvertedBitmapExtension.cs
- DocumentViewerConstants.cs
- PassportAuthentication.cs
- ChtmlTextWriter.cs
- Columns.cs
- BasicAsyncResult.cs
- ItemAutomationPeer.cs
- SqlDataSourceAdvancedOptionsForm.cs
- FieldReference.cs
- DateTimeStorage.cs
- WizardPanelChangingEventArgs.cs
- DefaultHttpHandler.cs
- TextTreeNode.cs
- Parser.cs
- ServiceNotStartedException.cs
- MaxMessageSizeStream.cs
- HtmlInputButton.cs
- MarginsConverter.cs
- DataGridViewHitTestInfo.cs
- AssemblyNameUtility.cs
- UrlAuthFailedErrorFormatter.cs
- BamlResourceContent.cs
- ToolStripDropDownClosedEventArgs.cs
- ElementMarkupObject.cs
- IIS7WorkerRequest.cs
- XmlSchema.cs
- ListViewGroupItemCollection.cs
- SqlWriter.cs
- RC2.cs
- RangeValidator.cs
- validationstate.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- regiisutil.cs
- ObjectListDesigner.cs
- DelegateCompletionCallbackWrapper.cs
- WebEventCodes.cs
- MexTcpBindingElement.cs
- AuthenticationModuleElement.cs
- WebControlAdapter.cs
- ISAPIWorkerRequest.cs
- Geometry3D.cs
- ToolStripItemDesigner.cs
- ApplicationFileCodeDomTreeGenerator.cs
- BitmapScalingModeValidation.cs
- TransformPatternIdentifiers.cs
- PersonalizationState.cs
- FormatStringEditor.cs
- SmtpDigestAuthenticationModule.cs
- DocobjHost.cs
- Panel.cs
- DebugTrace.cs
- WebControl.cs
- WindowsScrollBar.cs
- DesignerCalendarAdapter.cs
- SudsCommon.cs
- AliasedSlot.cs
- PropertyEmitter.cs
- ControlParameter.cs
- SegmentInfo.cs
- DescendentsWalker.cs
- WebPartsSection.cs
- Icon.cs
- DocumentViewerHelper.cs
- AccessText.cs
- SqlGatherProducedAliases.cs
- FamilyTypeface.cs
- HtmlToClrEventProxy.cs
- Delegate.cs
- QilReplaceVisitor.cs
- GZipObjectSerializer.cs
- FontInfo.cs
- XmlNotation.cs
- Compiler.cs
- OdbcCommand.cs
- ToolboxItemAttribute.cs
- AbsoluteQuery.cs