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
- OleDbParameterCollection.cs
- CharAnimationUsingKeyFrames.cs
- OleDbMetaDataFactory.cs
- DataTableReader.cs
- SingleResultAttribute.cs
- XmlWriterTraceListener.cs
- RequiredAttributeAttribute.cs
- GroupBox.cs
- PolyBezierSegment.cs
- Separator.cs
- ObjectManager.cs
- SignedPkcs7.cs
- XmlUtf8RawTextWriter.cs
- TextAutomationPeer.cs
- ClientScriptManager.cs
- HelpKeywordAttribute.cs
- initElementDictionary.cs
- PagerStyle.cs
- Overlapped.cs
- EditingCommands.cs
- SettingsContext.cs
- odbcmetadatafactory.cs
- DataControlFieldCell.cs
- InvalidMessageContractException.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- FullTextBreakpoint.cs
- Html32TextWriter.cs
- ExtensibleSyndicationObject.cs
- ExpandSegment.cs
- SafePointer.cs
- HtmlInputFile.cs
- ConfigurationFileMap.cs
- SQlBooleanStorage.cs
- MemoryStream.cs
- ServiceOperationListItemList.cs
- FacetDescription.cs
- RichTextBoxConstants.cs
- NullRuntimeConfig.cs
- PersonalizationStateQuery.cs
- SetStoryboardSpeedRatio.cs
- XmlSchemaAttribute.cs
- Italic.cs
- CoordinationService.cs
- EncryptedData.cs
- CollectionsUtil.cs
- TrustManager.cs
- DateTimeConstantAttribute.cs
- IntSumAggregationOperator.cs
- InheritanceContextChangedEventManager.cs
- DiscoveryEndpointElement.cs
- validationstate.cs
- UIElement.cs
- TagPrefixCollection.cs
- KnownTypes.cs
- NameSpaceEvent.cs
- TableColumn.cs
- NTAccount.cs
- PropertyMappingExceptionEventArgs.cs
- DefaultClaimSet.cs
- TextFormatter.cs
- TextEffectCollection.cs
- ConstructorBuilder.cs
- WebPartDeleteVerb.cs
- KeyEvent.cs
- LabelLiteral.cs
- TemplateControlCodeDomTreeGenerator.cs
- X509Certificate2Collection.cs
- XhtmlStyleClass.cs
- MimeTypePropertyAttribute.cs
- RC2.cs
- IdentityReference.cs
- XmlSchemaExternal.cs
- XmlSchemaAnnotated.cs
- CodeValidator.cs
- SetIterators.cs
- WebPartZone.cs
- ApplicationFileParser.cs
- LinqToSqlWrapper.cs
- DataPagerFieldCollection.cs
- IisTraceWebEventProvider.cs
- Bitmap.cs
- dtdvalidator.cs
- ImplicitInputBrush.cs
- SettingsProviderCollection.cs
- AsyncSerializedWorker.cs
- COAUTHIDENTITY.cs
- DetailsViewRowCollection.cs
- TemplatePagerField.cs
- LabelInfo.cs
- OraclePermission.cs
- ProfilePropertySettingsCollection.cs
- AttributeData.cs
- BaseTemplateCodeDomTreeGenerator.cs
- DataGridViewCellCancelEventArgs.cs
- RsaElement.cs
- SigningCredentials.cs
- PolicyLevel.cs
- SendKeys.cs
- XsltException.cs
- PingReply.cs