Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / MinimizableAttributeTypeConverter.cs / 1 / 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
- DeclarativeCatalogPart.cs
- Brush.cs
- RawAppCommandInputReport.cs
- RegistryKey.cs
- WebBrowserUriTypeConverter.cs
- RightsManagementPermission.cs
- MethodAccessException.cs
- HtmlInputText.cs
- TypeTypeConverter.cs
- ControlBuilder.cs
- MaterialGroup.cs
- EdmProviderManifest.cs
- XmlNamespaceMapping.cs
- SubqueryTrackingVisitor.cs
- OrderingInfo.cs
- METAHEADER.cs
- WebContext.cs
- ToolStrip.cs
- UpDownEvent.cs
- dsa.cs
- BasicCommandTreeVisitor.cs
- HttpListenerException.cs
- FileDetails.cs
- EntityContainerEntitySet.cs
- ServiceModelEnumValidatorAttribute.cs
- XmlTextWriter.cs
- PairComparer.cs
- CharacterShapingProperties.cs
- DesignerWebPartChrome.cs
- DateTimeFormatInfo.cs
- CachedPathData.cs
- NaturalLanguageHyphenator.cs
- KeyboardDevice.cs
- WrapPanel.cs
- Typeface.cs
- IdentityNotMappedException.cs
- RuntimeVariablesExpression.cs
- contentDescriptor.cs
- HandlerFactoryWrapper.cs
- Stylesheet.cs
- StylusButtonEventArgs.cs
- BamlCollectionHolder.cs
- ComAdminInterfaces.cs
- SignalGate.cs
- PointAnimation.cs
- ImageMetadata.cs
- XmlFormatWriterGenerator.cs
- WindowsAuthenticationEventArgs.cs
- HttpServerUtilityWrapper.cs
- CompilationSection.cs
- HelloMessageApril2005.cs
- FileDialog.cs
- DetailsViewAutoFormat.cs
- FixedTextPointer.cs
- BitmapEffectInput.cs
- KeyValueInternalCollection.cs
- WebPartMovingEventArgs.cs
- NamespaceImport.cs
- RepeaterCommandEventArgs.cs
- WindowsProgressbar.cs
- OpenTypeLayoutCache.cs
- ExpandableObjectConverter.cs
- EmbeddedMailObjectCollectionEditor.cs
- ExtentKey.cs
- Ref.cs
- HwndSubclass.cs
- XmlTextReaderImpl.cs
- CorePropertiesFilter.cs
- ContextMenu.cs
- ThreadNeutralSemaphore.cs
- PropertyEntry.cs
- SchemaObjectWriter.cs
- RegexGroupCollection.cs
- jithelpers.cs
- ValueOfAction.cs
- DataGridTableCollection.cs
- TypeUnloadedException.cs
- HandleRef.cs
- StoreItemCollection.cs
- Line.cs
- BCLDebug.cs
- WindowsListView.cs
- ResourceDescriptionAttribute.cs
- Condition.cs
- PixelShader.cs
- EventLogTraceListener.cs
- SchemaConstraints.cs
- Mappings.cs
- _ChunkParse.cs
- webeventbuffer.cs
- ReversePositionQuery.cs
- XmlSchemaElement.cs
- Application.cs
- ObjectConverter.cs
- GridViewRowCollection.cs
- mda.cs
- XmlUtilWriter.cs
- DirectionalLight.cs
- SQLGuid.cs
- ButtonPopupAdapter.cs