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
- HighlightVisual.cs
- DesignerCapabilities.cs
- ViewBox.cs
- WindowsFont.cs
- XPathDocumentBuilder.cs
- DecoderBestFitFallback.cs
- UriScheme.cs
- CommentGlyph.cs
- Action.cs
- BinaryMethodMessage.cs
- DictionaryItemsCollection.cs
- DispatcherProcessingDisabled.cs
- DbConnectionStringBuilder.cs
- AppDomainAttributes.cs
- MonthCalendar.cs
- SvcMapFile.cs
- ExtensionDataReader.cs
- SimpleMailWebEventProvider.cs
- IncrementalHitTester.cs
- PolyBezierSegment.cs
- JavascriptCallbackResponseProperty.cs
- Symbol.cs
- OrderedEnumerableRowCollection.cs
- ExpressionBinding.cs
- TextEvent.cs
- DropShadowEffect.cs
- PageWrapper.cs
- FixedBufferAttribute.cs
- RtfFormatStack.cs
- DispatchProxy.cs
- IgnoreSection.cs
- HeaderedContentControl.cs
- DecoderFallback.cs
- NotSupportedException.cs
- DeferredRunTextReference.cs
- EncodingInfo.cs
- IISMapPath.cs
- DrawItemEvent.cs
- XPathSelfQuery.cs
- XmlNamespaceMappingCollection.cs
- GifBitmapEncoder.cs
- DelegateTypeInfo.cs
- XmlCustomFormatter.cs
- RepeaterItem.cs
- UserControlFileEditor.cs
- documentsequencetextview.cs
- ListView.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- ObjectDataSourceChooseMethodsPanel.cs
- WebHttpBinding.cs
- ObjectKeyFrameCollection.cs
- ReliableOutputSessionChannel.cs
- ListItemCollection.cs
- ProfileInfo.cs
- ValueType.cs
- WsdlInspector.cs
- LogExtentCollection.cs
- ReadWriteObjectLock.cs
- ResXFileRef.cs
- ThousandthOfEmRealDoubles.cs
- TableItemPattern.cs
- NamedPipeProcessProtocolHandler.cs
- Panel.cs
- InstanceData.cs
- SqlCacheDependencyDatabaseCollection.cs
- TypographyProperties.cs
- IPCCacheManager.cs
- NamespaceMapping.cs
- XmlEncoding.cs
- MaterialGroup.cs
- ConstructorArgumentAttribute.cs
- DataServiceRequestOfT.cs
- MsmqInputChannelBase.cs
- AuthorizationRuleCollection.cs
- TextHidden.cs
- ToolStripPanelRow.cs
- UnsafeNativeMethods.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- InkPresenterAutomationPeer.cs
- StringSource.cs
- PeerSecurityManager.cs
- ClientProxyGenerator.cs
- ToolStripRendererSwitcher.cs
- NameValueSectionHandler.cs
- TextRunTypographyProperties.cs
- BStrWrapper.cs
- RequiredFieldValidator.cs
- DesignerAutoFormatStyle.cs
- IIS7WorkerRequest.cs
- ToolBarButton.cs
- DateTimeFormatInfo.cs
- AttachedPropertyMethodSelector.cs
- PlaceHolder.cs
- DuplicateWaitObjectException.cs
- WindowsUpDown.cs
- PropertyExpression.cs
- GroupStyle.cs
- SafePipeHandle.cs
- CollectionViewGroupInternal.cs
- PropertyMapper.cs