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
- MobileControlsSectionHelper.cs
- WeakEventTable.cs
- SqlTriggerAttribute.cs
- DataGridViewDataConnection.cs
- WindowsSecurityToken.cs
- StrokeCollection.cs
- ZoomComboBox.cs
- NegationPusher.cs
- LicFileLicenseProvider.cs
- GPPOINTF.cs
- TextSelectionHelper.cs
- WebBaseEventKeyComparer.cs
- Int64Converter.cs
- TextDataBindingHandler.cs
- Rotation3DAnimation.cs
- AbandonedMutexException.cs
- GestureRecognizer.cs
- Triplet.cs
- SplashScreenNativeMethods.cs
- CodeVariableDeclarationStatement.cs
- CatalogZoneBase.cs
- StylusPoint.cs
- StorageEntityTypeMapping.cs
- HostingEnvironmentSection.cs
- ISessionStateStore.cs
- HttpValueCollection.cs
- ImageSourceConverter.cs
- ServicePointManagerElement.cs
- IdentifierElement.cs
- RowType.cs
- InheritablePropertyChangeInfo.cs
- SortDescription.cs
- TypeTypeConverter.cs
- Claim.cs
- UnsignedPublishLicense.cs
- LinearKeyFrames.cs
- SID.cs
- ACE.cs
- StaticSiteMapProvider.cs
- XmlSchemaComplexContentRestriction.cs
- DataGridCellsPresenter.cs
- DeploymentSection.cs
- XmlEncodedRawTextWriter.cs
- TypeConverterHelper.cs
- figurelength.cs
- odbcmetadatafactory.cs
- AdRotator.cs
- SynchronizingStream.cs
- SpeechEvent.cs
- MembershipSection.cs
- EastAsianLunisolarCalendar.cs
- ApplicationContext.cs
- TreeNode.cs
- ListParagraph.cs
- DataConnectionHelper.cs
- PeerCollaboration.cs
- PeerNearMe.cs
- ClientTarget.cs
- ServicePointManagerElement.cs
- TabItem.cs
- ObjectCloneHelper.cs
- FlowPanelDesigner.cs
- DictionaryEntry.cs
- SqlDataSourceStatusEventArgs.cs
- DataGridLinkButton.cs
- GeometryConverter.cs
- ChtmlTextWriter.cs
- TextSelection.cs
- CodeChecksumPragma.cs
- DropTarget.cs
- DriveInfo.cs
- VisualStyleElement.cs
- SimpleHandlerFactory.cs
- mediaeventargs.cs
- ObjectViewEntityCollectionData.cs
- CodeIdentifier.cs
- NodeFunctions.cs
- SmtpCommands.cs
- TextOutput.cs
- AddInController.cs
- LogLogRecordEnumerator.cs
- autovalidator.cs
- SynchronousSendBindingElement.cs
- CredentialCache.cs
- TextElement.cs
- PlacementWorkspace.cs
- LoginName.cs
- KeyPullup.cs
- SQLBinaryStorage.cs
- DataMemberAttribute.cs
- Vector3DCollectionConverter.cs
- NameValueConfigurationCollection.cs
- ViewgenGatekeeper.cs
- WebPartCloseVerb.cs
- storepermission.cs
- DataView.cs
- Point.cs
- PriorityBinding.cs
- SQLDecimal.cs
- SqlException.cs