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
- HwndProxyElementProvider.cs
- PropertyBuilder.cs
- MessageBodyMemberAttribute.cs
- MessageDescription.cs
- SelectionItemPattern.cs
- SelectorItemAutomationPeer.cs
- GradientStop.cs
- PackagePart.cs
- DataDocumentXPathNavigator.cs
- TextBoxRenderer.cs
- Effect.cs
- BitmapSource.cs
- RootBuilder.cs
- TextDecorations.cs
- AttributeProviderAttribute.cs
- CodeDirectoryCompiler.cs
- DoubleKeyFrameCollection.cs
- Matrix3D.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- HitTestParameters.cs
- _ListenerResponseStream.cs
- SqlTransaction.cs
- PermissionAttributes.cs
- BindingCompleteEventArgs.cs
- DocumentSequence.cs
- TextRunTypographyProperties.cs
- PointUtil.cs
- WmlTextViewAdapter.cs
- HtmlTableRowCollection.cs
- RowSpanVector.cs
- TimeSpanOrInfiniteConverter.cs
- ContextDataSourceView.cs
- StringInfo.cs
- ExpressionLexer.cs
- ObjectDisposedException.cs
- EventWaitHandleSecurity.cs
- ExpressionBuilderCollection.cs
- XmlReaderSettings.cs
- NameHandler.cs
- WeakRefEnumerator.cs
- LinqDataSourceInsertEventArgs.cs
- OdbcConnection.cs
- TableItemStyle.cs
- Merger.cs
- UndoEngine.cs
- RunClient.cs
- Window.cs
- XmlDataLoader.cs
- DataSourceControl.cs
- TakeOrSkipQueryOperator.cs
- UpdatePanelTrigger.cs
- TreeNodeBindingCollection.cs
- ActivityStateRecord.cs
- ExcludePathInfo.cs
- SafeLibraryHandle.cs
- InputBindingCollection.cs
- TextSelectionProcessor.cs
- DataGridViewCellCancelEventArgs.cs
- ObjectAnimationUsingKeyFrames.cs
- UserPrincipalNameElement.cs
- SafeNativeMethods.cs
- ResXDataNode.cs
- LocalServiceSecuritySettings.cs
- XmlBaseReader.cs
- DateTimeFormatInfo.cs
- DataColumn.cs
- SqlConnectionPoolProviderInfo.cs
- StringResourceManager.cs
- JsonDeserializer.cs
- ChildrenQuery.cs
- Utils.cs
- HTMLTextWriter.cs
- GPPOINTF.cs
- TimeoutException.cs
- EntityDataSourceDataSelectionPanel.cs
- TreeView.cs
- DbProviderFactoriesConfigurationHandler.cs
- ResXBuildProvider.cs
- User.cs
- SafeEventHandle.cs
- GlobalAllocSafeHandle.cs
- DataGridViewHeaderCell.cs
- Context.cs
- ListViewAutomationPeer.cs
- JsonQNameDataContract.cs
- ClickablePoint.cs
- _UriSyntax.cs
- CqlErrorHelper.cs
- TextBreakpoint.cs
- StorageEndPropertyMapping.cs
- CryptoHelper.cs
- EntityClientCacheKey.cs
- AuthenticationServiceManager.cs
- __TransparentProxy.cs
- ToolBarDesigner.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ThreadStartException.cs
- HtmlElement.cs
- Label.cs
- VisualState.cs