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
- DesignerActionTextItem.cs
- ExtractedStateEntry.cs
- DecoderReplacementFallback.cs
- EncoderReplacementFallback.cs
- ApplicationContext.cs
- ControlPersister.cs
- DoubleMinMaxAggregationOperator.cs
- BulletedListEventArgs.cs
- SqlDependency.cs
- PartialArray.cs
- SemanticAnalyzer.cs
- HtmlLiteralTextAdapter.cs
- TracedNativeMethods.cs
- SymbolUsageManager.cs
- Int16AnimationUsingKeyFrames.cs
- XmlArrayItemAttributes.cs
- cookiecollection.cs
- Pair.cs
- ConsoleTraceListener.cs
- PlatformCulture.cs
- XmlDownloadManager.cs
- DesignerVerb.cs
- XmlSerializationWriter.cs
- Expression.DebuggerProxy.cs
- SqlDataSourceRefreshSchemaForm.cs
- HttpWebRequest.cs
- StringReader.cs
- BuildResultCache.cs
- HashAlgorithm.cs
- UserPreferenceChangingEventArgs.cs
- WebCategoryAttribute.cs
- RegistrationServices.cs
- ArgumentException.cs
- Operator.cs
- MatrixAnimationUsingPath.cs
- BCLDebug.cs
- WebControlAdapter.cs
- SrgsItemList.cs
- OverflowException.cs
- RoamingStoreFile.cs
- MetadataCollection.cs
- ValidationPropertyAttribute.cs
- DesignerActionVerbList.cs
- localization.cs
- TextEditorParagraphs.cs
- IdentityModelStringsVersion1.cs
- ColorTransform.cs
- MsmqHostedTransportConfiguration.cs
- SchemaTableColumn.cs
- XmlSchemas.cs
- SeekStoryboard.cs
- DPTypeDescriptorContext.cs
- TreeViewEvent.cs
- EditorPartChrome.cs
- WpfSharedBamlSchemaContext.cs
- XmlFormatMapping.cs
- CharEnumerator.cs
- GatewayDefinition.cs
- XmlRootAttribute.cs
- EntityModelSchemaGenerator.cs
- Clock.cs
- DesignerTransaction.cs
- RowToFieldTransformer.cs
- SharedStatics.cs
- WebPartManagerInternals.cs
- VarRefManager.cs
- VScrollProperties.cs
- DataPagerCommandEventArgs.cs
- SchemaNames.cs
- TextReader.cs
- HandlerFactoryWrapper.cs
- CopyAction.cs
- TextWriter.cs
- Utils.cs
- FontStretches.cs
- GridViewPageEventArgs.cs
- ResXDataNode.cs
- Size3DValueSerializer.cs
- DataColumn.cs
- CompositeControl.cs
- DynamicMetaObjectBinder.cs
- FormViewPageEventArgs.cs
- WorkflowWebHostingModule.cs
- PropertiesTab.cs
- Publisher.cs
- SecurityManager.cs
- DataTableNewRowEvent.cs
- FileLoadException.cs
- Interlocked.cs
- SQLMoney.cs
- IteratorDescriptor.cs
- RemoteCryptoRsaServiceProvider.cs
- WeakReadOnlyCollection.cs
- TCPClient.cs
- RawTextInputReport.cs
- CollectionTraceRecord.cs
- CodePropertyReferenceExpression.cs
- SafeNativeMethods.cs
- ConfigPathUtility.cs
- SignatureResourcePool.cs