Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ChameleonKey.cs
- WinInetCache.cs
- InternalResources.cs
- WebPartDisplayModeCollection.cs
- Pkcs7Recipient.cs
- DoubleLink.cs
- OleDbRowUpdatingEvent.cs
- StructuredProperty.cs
- SizeConverter.cs
- TransformCollection.cs
- ComPersistableTypeElementCollection.cs
- XmlWhitespace.cs
- ItemAutomationPeer.cs
- RangeEnumerable.cs
- CompilerCollection.cs
- ToolboxCategory.cs
- HtmlLink.cs
- UpdateCommand.cs
- SerialPinChanges.cs
- QueueProcessor.cs
- SoapExtensionTypeElementCollection.cs
- XslAst.cs
- SuspendDesigner.cs
- ByteStreamGeometryContext.cs
- DependencyPropertyHelper.cs
- BaseValidator.cs
- SerializationEventsCache.cs
- Mouse.cs
- WebBrowserNavigatingEventHandler.cs
- EndpointConfigContainer.cs
- ReflectEventDescriptor.cs
- FixedPageAutomationPeer.cs
- DocComment.cs
- SqlNotificationRequest.cs
- AppDomainFactory.cs
- FormattedText.cs
- RuntimeHandles.cs
- XmlComplianceUtil.cs
- LocatorManager.cs
- DataControlLinkButton.cs
- ScrollBar.cs
- CheckedListBox.cs
- CollectionBase.cs
- PromptBuilder.cs
- SamlAdvice.cs
- DrawingContext.cs
- TimeSpanConverter.cs
- ResourceReferenceExpressionConverter.cs
- EntityModelSchemaGenerator.cs
- IfAction.cs
- DataServiceQueryProvider.cs
- NamedPipeAppDomainProtocolHandler.cs
- ArrayTypeMismatchException.cs
- StringBuilder.cs
- Error.cs
- CompleteWizardStep.cs
- XPathDocumentBuilder.cs
- TableLayoutPanel.cs
- ParseElement.cs
- XsltLoader.cs
- ConnectorMovedEventArgs.cs
- StorageEntitySetMapping.cs
- ZoomPercentageConverter.cs
- DataGridViewHitTestInfo.cs
- PKCS1MaskGenerationMethod.cs
- EntityCollectionChangedParams.cs
- PropertyRef.cs
- RowsCopiedEventArgs.cs
- wmiprovider.cs
- ObjectAnimationUsingKeyFrames.cs
- RewritingValidator.cs
- XmlSerializerAssemblyAttribute.cs
- QueryContext.cs
- PrePrepareMethodAttribute.cs
- SqlUserDefinedAggregateAttribute.cs
- HebrewNumber.cs
- DependencyProperty.cs
- TextModifierScope.cs
- IDReferencePropertyAttribute.cs
- SimpleTextLine.cs
- ExpandCollapsePatternIdentifiers.cs
- Int16.cs
- CriticalExceptions.cs
- HtmlImage.cs
- IntSecurity.cs
- SplitContainer.cs
- CurrentChangedEventManager.cs
- AdapterUtil.cs
- AnimatedTypeHelpers.cs
- SourceFilter.cs
- SpeechRecognitionEngine.cs
- FormViewInsertedEventArgs.cs
- SolidColorBrush.cs
- AudioException.cs
- PointAnimation.cs
- AssemblyAttributesGoHere.cs
- ArgIterator.cs
- _NegoStream.cs
- LOSFormatter.cs
- DSACryptoServiceProvider.cs