Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- DataSource.cs
- XmlSignificantWhitespace.cs
- WeakRefEnumerator.cs
- Oid.cs
- CallbackHandler.cs
- ConnectionStringSettings.cs
- SerializationFieldInfo.cs
- figurelength.cs
- XmlSerializationWriter.cs
- DataGridViewTextBoxEditingControl.cs
- AxisAngleRotation3D.cs
- TemplateContainer.cs
- ListMarkerLine.cs
- CodeAttributeDeclarationCollection.cs
- PathTooLongException.cs
- ScrollItemProviderWrapper.cs
- FileSystemInfo.cs
- FrameDimension.cs
- Pen.cs
- XmlNodeChangedEventManager.cs
- Variable.cs
- XmlTextEncoder.cs
- COM2ExtendedUITypeEditor.cs
- NotifyInputEventArgs.cs
- Processor.cs
- BaseDataBoundControl.cs
- MetadataItem.cs
- codemethodreferenceexpression.cs
- StringCollection.cs
- formatter.cs
- AliasedSlot.cs
- UInt16.cs
- ScrollPattern.cs
- DocumentReference.cs
- DataObjectEventArgs.cs
- CodePrimitiveExpression.cs
- TextPattern.cs
- FixedDSBuilder.cs
- CodeIdentifier.cs
- ViewCellSlot.cs
- SeverityFilter.cs
- XmlnsPrefixAttribute.cs
- XmlUrlResolver.cs
- FastEncoderWindow.cs
- EventItfInfo.cs
- UriTemplateVariableQueryValue.cs
- XmlHierarchyData.cs
- SplineKeyFrames.cs
- StringSource.cs
- validationstate.cs
- ScriptResourceHandler.cs
- SqlBuilder.cs
- webbrowsersite.cs
- HtmlHead.cs
- SrgsRule.cs
- Utils.cs
- Int32CollectionValueSerializer.cs
- RunWorkerCompletedEventArgs.cs
- BufferedGraphicsContext.cs
- ImageList.cs
- XmlSortKeyAccumulator.cs
- HttpAsyncResult.cs
- XmlCharacterData.cs
- DependencyPropertyConverter.cs
- PreloadedPackages.cs
- TypedColumnHandler.cs
- ToolStripRendererSwitcher.cs
- FileStream.cs
- MessageBox.cs
- ToolStripSeparator.cs
- SmiEventSink_Default.cs
- JavaScriptString.cs
- SmtpMail.cs
- QueueProcessor.cs
- SQLBoolean.cs
- StateRuntime.cs
- SiteMapDataSourceView.cs
- ToolStripDropTargetManager.cs
- Executor.cs
- QilIterator.cs
- MobilePage.cs
- XmlSubtreeReader.cs
- SchemaTableOptionalColumn.cs
- MemberMaps.cs
- RichTextBoxDesigner.cs
- DetailsViewPagerRow.cs
- IndexingContentUnit.cs
- DBCSCodePageEncoding.cs
- RuleAction.cs
- DBConcurrencyException.cs
- DelegateHelpers.Generated.cs
- StyleBamlTreeBuilder.cs
- ToolStripDropDown.cs
- StringAttributeCollection.cs
- DataTablePropertyDescriptor.cs
- WebPartCloseVerb.cs
- BulletDecorator.cs
- StackOverflowException.cs
- SerialStream.cs
- RangeValuePatternIdentifiers.cs