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
- BinaryObjectWriter.cs
- FileStream.cs
- StringPropertyBuilder.cs
- Int32CollectionValueSerializer.cs
- diagnosticsswitches.cs
- RegexFCD.cs
- EdmSchemaError.cs
- IDQuery.cs
- ComAdminInterfaces.cs
- DataGridAddNewRow.cs
- XmlnsCompatibleWithAttribute.cs
- ToolboxItem.cs
- SymmetricKeyWrap.cs
- ObjectReferenceStack.cs
- StackOverflowException.cs
- ImageButton.cs
- CatalogPartChrome.cs
- _Connection.cs
- KeyFrames.cs
- SqlHelper.cs
- DynamicHyperLink.cs
- ObjectPersistData.cs
- MapPathBasedVirtualPathProvider.cs
- CatalogZoneDesigner.cs
- EventEntry.cs
- GlobalizationAssembly.cs
- BindingBase.cs
- NonClientArea.cs
- CachedFontFace.cs
- FileVersion.cs
- SoapReflectionImporter.cs
- FamilyMapCollection.cs
- SplitContainer.cs
- CellTreeNodeVisitors.cs
- ContainerParaClient.cs
- MimeXmlReflector.cs
- BufferedGraphicsContext.cs
- WebBodyFormatMessageProperty.cs
- ObjectConverter.cs
- TimeSpanParse.cs
- WebBrowserUriTypeConverter.cs
- WebConfigurationHost.cs
- XamlToRtfWriter.cs
- IsolatedStorageFileStream.cs
- SafeFileHandle.cs
- SecurityTokenTypes.cs
- XmlSchemaSimpleTypeRestriction.cs
- BooleanToVisibilityConverter.cs
- followingquery.cs
- DictionarySectionHandler.cs
- Main.cs
- WmlTextBoxAdapter.cs
- XmlAtomicValue.cs
- EmptyStringExpandableObjectConverter.cs
- UpdateTranslator.cs
- SmtpFailedRecipientsException.cs
- login.cs
- AnnotationResource.cs
- DatatypeImplementation.cs
- Run.cs
- TableRowGroupCollection.cs
- DesignerTransactionCloseEvent.cs
- odbcmetadatafactory.cs
- updatecommandorderer.cs
- DependencyPropertyAttribute.cs
- FilteredAttributeCollection.cs
- CqlErrorHelper.cs
- Crypto.cs
- EventSetter.cs
- DropDownList.cs
- DbConnectionFactory.cs
- TargetConverter.cs
- MessageBox.cs
- DesignerActionUI.cs
- HostedTransportConfigurationBase.cs
- EventListener.cs
- CodeDirectoryCompiler.cs
- SqlTrackingQuery.cs
- BinHexDecoder.cs
- InitializationEventAttribute.cs
- QilInvokeEarlyBound.cs
- CryptoApi.cs
- SettingsProviderCollection.cs
- DataGridViewRowsRemovedEventArgs.cs
- SqlClientMetaDataCollectionNames.cs
- ComponentConverter.cs
- CompositeActivityTypeDescriptorProvider.cs
- StateWorkerRequest.cs
- EditorZoneDesigner.cs
- SafeSecurityHandles.cs
- _UncName.cs
- MappingModelBuildProvider.cs
- RelationalExpressions.cs
- HtmlTableRowCollection.cs
- XsdDataContractExporter.cs
- PointLightBase.cs
- SqlDataSourceCache.cs
- CodeAttributeDeclarationCollection.cs
- FontWeight.cs
- XmlIncludeAttribute.cs