Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Configuration / System / Configuration / ConfigurationConverterBase.cs / 1 / ConfigurationConverterBase.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; using System.IO; using System.Reflection; using System.Security.Permissions; using System.Xml; using System.Collections.Specialized; using System.Globalization; using System.ComponentModel; using System.Security; using System.Text; namespace System.Configuration { public abstract class ConfigurationConverterBase : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext ctx, Type type) { return (type == typeof(string)); } public override bool CanConvertFrom(ITypeDescriptorContext ctx, Type type) { return (type == typeof(string)); } internal void ValidateType(object value, Type expected) { if ((value != null) && (value.GetType() != expected)) { throw new ArgumentException(SR.GetString(SR.Converter_unsupported_value_type, expected.Name)); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; using System.IO; using System.Reflection; using System.Security.Permissions; using System.Xml; using System.Collections.Specialized; using System.Globalization; using System.ComponentModel; using System.Security; using System.Text; namespace System.Configuration { public abstract class ConfigurationConverterBase : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext ctx, Type type) { return (type == typeof(string)); } public override bool CanConvertFrom(ITypeDescriptorContext ctx, Type type) { return (type == typeof(string)); } internal void ValidateType(object value, Type expected) { if ((value != null) && (value.GetType() != expected)) { throw new ArgumentException(SR.GetString(SR.Converter_unsupported_value_type, expected.Name)); } } } } // 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
- WebServiceClientProxyGenerator.cs
- TextContainerChangeEventArgs.cs
- RestHandler.cs
- RegionData.cs
- PageContent.cs
- shaperfactory.cs
- InvalidWMPVersionException.cs
- SQLResource.cs
- RestHandler.cs
- DataGrid.cs
- PageAdapter.cs
- SelectionRange.cs
- DelayedRegex.cs
- safex509handles.cs
- Operand.cs
- RepeatBehaviorConverter.cs
- DynamicMethod.cs
- KeyValueSerializer.cs
- IntSecurity.cs
- Misc.cs
- UtilityExtension.cs
- TextBoxView.cs
- ErrorRuntimeConfig.cs
- DesignerImageAdapter.cs
- CharacterBufferReference.cs
- BitmapEffectDrawing.cs
- Interlocked.cs
- TdsParser.cs
- XmlAttribute.cs
- NativeMethods.cs
- TextBox.cs
- SafeNativeMemoryHandle.cs
- ZipArchive.cs
- DataErrorValidationRule.cs
- HttpConfigurationSystem.cs
- sqlcontext.cs
- RealizationDrawingContextWalker.cs
- SqlClientWrapperSmiStreamChars.cs
- MediaPlayerState.cs
- PreparingEnlistment.cs
- TreeNodeBinding.cs
- SqlCommandAsyncResult.cs
- WinEventQueueItem.cs
- Part.cs
- MenuBase.cs
- DiagnosticTrace.cs
- StorageMappingItemCollection.cs
- OleDbFactory.cs
- ElementHostPropertyMap.cs
- clipboard.cs
- DocumentsTrace.cs
- ObjectQueryExecutionPlan.cs
- BasicBrowserDialog.designer.cs
- ResourcePool.cs
- ContextInformation.cs
- ArrayList.cs
- ScrollChrome.cs
- RegionIterator.cs
- ActivityInterfaces.cs
- InternalConfigEventArgs.cs
- WindowsUpDown.cs
- LookupBindingPropertiesAttribute.cs
- DesignSurfaceEvent.cs
- BookmarkScopeInfo.cs
- Wizard.cs
- CodeBinaryOperatorExpression.cs
- ObservableDictionary.cs
- CryptoStream.cs
- TypeForwardedToAttribute.cs
- XmlSchemaNotation.cs
- Label.cs
- DataGridViewRowCollection.cs
- HttpCapabilitiesBase.cs
- WebPartAddingEventArgs.cs
- ImageBrush.cs
- XmlTextReaderImplHelpers.cs
- GatewayDefinition.cs
- Timeline.cs
- ContextMenuAutomationPeer.cs
- ItemList.cs
- FloatUtil.cs
- Mouse.cs
- TypeDefinition.cs
- ExceptionUtil.cs
- CodeAttributeDeclarationCollection.cs
- BitmapSource.cs
- ObjectAnimationUsingKeyFrames.cs
- EmptyStringExpandableObjectConverter.cs
- QueryRewriter.cs
- LineProperties.cs
- PaperSource.cs
- CodeConditionStatement.cs
- CacheOutputQuery.cs
- WindowsListViewItem.cs
- ResourcesBuildProvider.cs
- DuplicateWaitObjectException.cs
- DataGridViewCellConverter.cs
- DataGridViewRowCollection.cs
- CompoundFileDeflateTransform.cs
- MembershipValidatePasswordEventArgs.cs