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
- StringWriter.cs
- WaitHandle.cs
- FixedElement.cs
- ReservationCollection.cs
- TableParaClient.cs
- CodeBinaryOperatorExpression.cs
- List.cs
- StylusPlugInCollection.cs
- DetailsViewUpdatedEventArgs.cs
- ProcessStartInfo.cs
- TypeDescriptionProvider.cs
- NullableIntMinMaxAggregationOperator.cs
- TabItemWrapperAutomationPeer.cs
- PolyLineSegment.cs
- KeyPullup.cs
- StylusPointProperty.cs
- TextTreeObjectNode.cs
- FactoryGenerator.cs
- SchemaLookupTable.cs
- TreeNodeCollection.cs
- OleDbFactory.cs
- IItemProperties.cs
- XmlDocumentType.cs
- MonitoringDescriptionAttribute.cs
- XPathParser.cs
- ApplicationSecurityInfo.cs
- XmlExtensionFunction.cs
- ErrorFormatter.cs
- ArithmeticException.cs
- TemplatePartAttribute.cs
- DataTemplateKey.cs
- ControlTemplate.cs
- CommandEventArgs.cs
- ObjectDataSourceEventArgs.cs
- xml.cs
- InkCanvasInnerCanvas.cs
- ProfileGroupSettings.cs
- EntityStoreSchemaGenerator.cs
- TextClipboardData.cs
- SafeCoTaskMem.cs
- RawKeyboardInputReport.cs
- SecurityPolicySection.cs
- MultiAsyncResult.cs
- NonSerializedAttribute.cs
- CollaborationHelperFunctions.cs
- SupportsEventValidationAttribute.cs
- GeneratedCodeAttribute.cs
- Point3DCollection.cs
- wgx_render.cs
- UrlAuthFailedErrorFormatter.cs
- RadioButtonBaseAdapter.cs
- BitmapDecoder.cs
- LogRestartAreaEnumerator.cs
- XmlSchemaCollection.cs
- DecodeHelper.cs
- ResourcePermissionBaseEntry.cs
- Parameter.cs
- CompilerState.cs
- Label.cs
- _AutoWebProxyScriptEngine.cs
- ExtendedProtectionPolicy.cs
- UpdatePanelTriggerCollection.cs
- CriticalExceptions.cs
- DependencyPropertyHelper.cs
- BrowserInteropHelper.cs
- GlobalDataBindingHandler.cs
- Rectangle.cs
- Context.cs
- ActiveXContainer.cs
- DrawListViewColumnHeaderEventArgs.cs
- Aggregates.cs
- MetadataCache.cs
- WebEventTraceProvider.cs
- Utilities.cs
- ComplexObject.cs
- RolePrincipal.cs
- ButtonBase.cs
- BamlRecordWriter.cs
- GeometryModel3D.cs
- UInt64Storage.cs
- BStrWrapper.cs
- Point3DKeyFrameCollection.cs
- PerformanceCounterCategory.cs
- Content.cs
- EffectiveValueEntry.cs
- ListViewUpdatedEventArgs.cs
- ViewGenResults.cs
- MimeReflector.cs
- SendSecurityHeaderElement.cs
- RSAOAEPKeyExchangeFormatter.cs
- EpmSourceTree.cs
- LinkDesigner.cs
- MimeWriter.cs
- ModuleBuilderData.cs
- VectorConverter.cs
- SecurityCredentialsManager.cs
- HostingPreferredMapPath.cs
- HMACSHA256.cs
- HttpApplicationFactory.cs
- ScriptResourceInfo.cs