Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / MinimizableAttributeTypeConverter.cs / 1305376 / 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. // //----------------------------------------------------------------------------- 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SerializationHelper.cs
- WorkflowDesignerColors.cs
- CustomWebEventKey.cs
- CorrelationResolver.cs
- NoneExcludedImageIndexConverter.cs
- ChtmlSelectionListAdapter.cs
- DataGridRelationshipRow.cs
- SafeSystemMetrics.cs
- List.cs
- SQLResource.cs
- StringToken.cs
- ITextView.cs
- QueryExecutionOption.cs
- FigureParagraph.cs
- CollectionBase.cs
- Separator.cs
- SqlRewriteScalarSubqueries.cs
- Repeater.cs
- TextOnlyOutput.cs
- ResXResourceReader.cs
- xml.cs
- DbProviderManifest.cs
- BuildProviderAppliesToAttribute.cs
- MessageFault.cs
- InternalConfigConfigurationFactory.cs
- ArraySubsetEnumerator.cs
- RoleGroupCollection.cs
- TranslateTransform3D.cs
- ImageMapEventArgs.cs
- XPathEmptyIterator.cs
- GeometryHitTestResult.cs
- RC2.cs
- ImageDrawing.cs
- FrameworkContentElement.cs
- SplashScreenNativeMethods.cs
- Internal.cs
- SafeThreadHandle.cs
- DesignerCapabilities.cs
- Publisher.cs
- OrderedDictionary.cs
- ConfigurationException.cs
- TextAnchor.cs
- SqlDataSourceFilteringEventArgs.cs
- Pkcs9Attribute.cs
- OleCmdHelper.cs
- UpdateTracker.cs
- ErrorRuntimeConfig.cs
- InputProcessorProfilesLoader.cs
- WindowsRegion.cs
- Wizard.cs
- TriState.cs
- AnnotationHelper.cs
- ExtensionElement.cs
- Point3DAnimationUsingKeyFrames.cs
- ClientCultureInfo.cs
- TextEmbeddedObject.cs
- SqlTrackingService.cs
- PictureBox.cs
- StoragePropertyMapping.cs
- OutputCacheSettingsSection.cs
- PartitionerStatic.cs
- StackOverflowException.cs
- PtsPage.cs
- AutoResetEvent.cs
- TdsParserStateObject.cs
- EditorPart.cs
- ConvertersCollection.cs
- Range.cs
- DateTimeUtil.cs
- PropertyEmitterBase.cs
- TableLayoutPanelResizeGlyph.cs
- DrawingContextDrawingContextWalker.cs
- AdapterDictionary.cs
- CustomAttributeFormatException.cs
- AttributeProviderAttribute.cs
- DataServiceProcessingPipeline.cs
- MemberDomainMap.cs
- ConnectionStringsExpressionEditor.cs
- StringKeyFrameCollection.cs
- XmlLinkedNode.cs
- RotateTransform.cs
- AttachInfo.cs
- GetIndexBinder.cs
- RangeValuePattern.cs
- DotNetATv1WindowsLogEntrySerializer.cs
- XmlComplianceUtil.cs
- FixedSOMLineRanges.cs
- Site.cs
- DesignerActionListCollection.cs
- XmlSignificantWhitespace.cs
- LinqExpressionNormalizer.cs
- ObjectStateManagerMetadata.cs
- SessionStateUtil.cs
- PerformanceCounterTraceRecord.cs
- WebPartDeleteVerb.cs
- DbParameterCollection.cs
- TableRow.cs
- ArgumentNullException.cs
- NativeStructs.cs
- LocatorPartList.cs