Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ConfigurationConverterBase.cs / 1305376 / 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
- XXXInfos.cs
- CacheChildrenQuery.cs
- AppDomainFactory.cs
- ExtensionMethods.cs
- WorkflowRuntimeEndpoint.cs
- _NetworkingPerfCounters.cs
- DataErrorValidationRule.cs
- CachedPathData.cs
- RoleManagerEventArgs.cs
- TextureBrush.cs
- WebPartsSection.cs
- IdnMapping.cs
- SourceFileInfo.cs
- XmlName.cs
- TrackBar.cs
- TransformerInfo.cs
- TokenBasedSetEnumerator.cs
- ColorConvertedBitmap.cs
- XmlParserContext.cs
- SvcMapFile.cs
- GradientBrush.cs
- DiscoveryDocumentSearchPattern.cs
- SqlProvider.cs
- AttributeQuery.cs
- EncoderParameters.cs
- BindingOperations.cs
- RefreshPropertiesAttribute.cs
- PointIndependentAnimationStorage.cs
- HttpHeaderCollection.cs
- DirectionalLight.cs
- DesignerVerbCollection.cs
- AggregateNode.cs
- CollectionViewProxy.cs
- PathGeometry.cs
- EntityDataSourceSelectedEventArgs.cs
- ExpressionPrefixAttribute.cs
- TextTreeText.cs
- arclist.cs
- PropertyInformationCollection.cs
- NetSectionGroup.cs
- QualificationDataItem.cs
- InvalidProgramException.cs
- VisualTransition.cs
- HttpModuleCollection.cs
- PenLineJoinValidation.cs
- MailWebEventProvider.cs
- ApplicationActivator.cs
- NameTable.cs
- Panel.cs
- ResourceProviderFactory.cs
- SymbolEqualComparer.cs
- SqlGatherProducedAliases.cs
- SHA1CryptoServiceProvider.cs
- CollectionView.cs
- HandleRef.cs
- Button.cs
- SrgsDocument.cs
- MetadataProperty.cs
- DBDataPermissionAttribute.cs
- RawStylusInputCustomData.cs
- ScaleTransform3D.cs
- PingOptions.cs
- ImageMapEventArgs.cs
- EntitySqlQueryCacheKey.cs
- DataBindingExpressionBuilder.cs
- SecurityPermission.cs
- Pkcs7Recipient.cs
- DetailsView.cs
- ProfileSettingsCollection.cs
- BaseDataList.cs
- MenuItemStyle.cs
- EncoderNLS.cs
- XmlLanguageConverter.cs
- TextServicesDisplayAttributePropertyRanges.cs
- HMACMD5.cs
- AssociationTypeEmitter.cs
- ItemsControl.cs
- ConstantProjectedSlot.cs
- DefaultWorkflowSchedulerService.cs
- ProcessHost.cs
- CodeExporter.cs
- ToolboxBitmapAttribute.cs
- InstanceOwner.cs
- MetadataSource.cs
- PolyLineSegmentFigureLogic.cs
- CustomWebEventKey.cs
- SerializableAuthorizationContext.cs
- webeventbuffer.cs
- ProjectionCamera.cs
- ElementUtil.cs
- xmlfixedPageInfo.cs
- XPathMultyIterator.cs
- PointLightBase.cs
- BitmapMetadataBlob.cs
- CryptographicAttribute.cs
- BitmapEffectGeneralTransform.cs
- AsymmetricKeyExchangeDeformatter.cs
- SecurityPermission.cs
- KeyNotFoundException.cs
- ErrorFormatterPage.cs