Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / MinimizableAttributeTypeConverter.cs / 2 / MinimizableAttributeTypeConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Globalization; ////// Summary description for MinimizableAttributeTypeConverter. /// internal class MinimizableAttributeTypeConverter : BooleanConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string)) { return true; } return base.CanConvertFrom(context, sourceType); } public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { string strValue = value as string; if (strValue != null) { if ((strValue.Length > 0) && !String.Equals(strValue, "false", StringComparison.OrdinalIgnoreCase)) { return true; } else { return false; } } return base.ConvertFrom(context, culture, value); } } } // 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. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Globalization; ////// Summary description for MinimizableAttributeTypeConverter. /// internal class MinimizableAttributeTypeConverter : BooleanConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string)) { return true; } return base.CanConvertFrom(context, sourceType); } public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { string strValue = value as string; if (strValue != null) { if ((strValue.Length > 0) && !String.Equals(strValue, "false", StringComparison.OrdinalIgnoreCase)) { return true; } else { return false; } } return base.ConvertFrom(context, culture, value); } } } // 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
- WebServiceHandlerFactory.cs
- ScriptingWebServicesSectionGroup.cs
- DataGridItemEventArgs.cs
- ObjectDataSourceEventArgs.cs
- WebPartAuthorizationEventArgs.cs
- DateTimeFormatInfo.cs
- BufferModeSettings.cs
- UITypeEditor.cs
- DesignTimeParseData.cs
- DoubleConverter.cs
- Annotation.cs
- XmlAnyAttributeAttribute.cs
- WebPartEditorCancelVerb.cs
- QuaternionConverter.cs
- DynamicValueConverter.cs
- RecognizerStateChangedEventArgs.cs
- EmptyElement.cs
- Invariant.cs
- ToolStripRenderer.cs
- filewebresponse.cs
- LogicalCallContext.cs
- UrlMapping.cs
- MatrixConverter.cs
- FlowDocumentScrollViewer.cs
- FontUnitConverter.cs
- GridViewSelectEventArgs.cs
- safesecurityhelperavalon.cs
- RoutedEvent.cs
- RequiredAttributeAttribute.cs
- ExpressionQuoter.cs
- _WinHttpWebProxyDataBuilder.cs
- HttpListenerException.cs
- SafeCoTaskMem.cs
- ForceCopyBuildProvider.cs
- CodeIdentifiers.cs
- EndpointDiscoveryElement.cs
- TreeNodeStyle.cs
- StyleCollectionEditor.cs
- ToggleProviderWrapper.cs
- HttpListenerContext.cs
- DialogBaseForm.cs
- SHA1CryptoServiceProvider.cs
- SystemEvents.cs
- ToolStripItemTextRenderEventArgs.cs
- QuaternionAnimationBase.cs
- autovalidator.cs
- FileDialogPermission.cs
- BooleanProjectedSlot.cs
- DataGridViewCellEventArgs.cs
- DbUpdateCommandTree.cs
- TextPenaltyModule.cs
- Rotation3D.cs
- ExpressionParser.cs
- ToolStripSplitButton.cs
- DocumentReference.cs
- XmlNode.cs
- DataGridViewCellCancelEventArgs.cs
- CodeTypeParameterCollection.cs
- WebErrorHandler.cs
- CommandDevice.cs
- PreviewKeyDownEventArgs.cs
- _ListenerRequestStream.cs
- StringSorter.cs
- LinqDataSourceInsertEventArgs.cs
- DataExpression.cs
- CodeExporter.cs
- TimeManager.cs
- MsmqOutputMessage.cs
- SetStateDesigner.cs
- SQLDouble.cs
- HGlobalSafeHandle.cs
- Script.cs
- XmlDataProvider.cs
- WindowShowOrOpenTracker.cs
- BaseValidatorDesigner.cs
- NavigationFailedEventArgs.cs
- CreateUserWizardStep.cs
- SignatureDescription.cs
- LeaseManager.cs
- ListItemConverter.cs
- OracleRowUpdatingEventArgs.cs
- QueryCursorEventArgs.cs
- GenericTypeParameterBuilder.cs
- ImageAutomationPeer.cs
- Vector3DCollection.cs
- WindowsTreeView.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- SrgsRule.cs
- DataGridViewCellStyleEditor.cs
- WindowsScroll.cs
- DesignerRegionMouseEventArgs.cs
- CompensationDesigner.cs
- HotSpotCollectionEditor.cs
- PathNode.cs
- CachedTypeface.cs
- DiffuseMaterial.cs
- ActiveXSite.cs
- Models.cs
- ContainerControl.cs
- Instrumentation.cs