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
- EventSetter.cs
- TextBoxBase.cs
- SerialReceived.cs
- WindowsProgressbar.cs
- SmtpNetworkElement.cs
- StreamInfo.cs
- ResumeStoryboard.cs
- ZipIOExtraField.cs
- COM2EnumConverter.cs
- CrossSiteScriptingValidation.cs
- TriggerAction.cs
- DragStartedEventArgs.cs
- ManipulationStartingEventArgs.cs
- ThemeDictionaryExtension.cs
- HelloMessageCD1.cs
- CollectionDataContractAttribute.cs
- BindingMemberInfo.cs
- SqlServer2KCompatibilityAnnotation.cs
- GridViewAutoFormat.cs
- AssemblyBuilder.cs
- ServiceMetadataPublishingElement.cs
- SQLInt16.cs
- Preprocessor.cs
- Point3DAnimationBase.cs
- UriWriter.cs
- DbProviderServices.cs
- MaskedTextProvider.cs
- AttachedAnnotationChangedEventArgs.cs
- XamlFigureLengthSerializer.cs
- IsolatedStoragePermission.cs
- EventOpcode.cs
- AlphabeticalEnumConverter.cs
- MSG.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- HttpAsyncResult.cs
- ScaleTransform3D.cs
- HtmlShim.cs
- Bidi.cs
- DataControlHelper.cs
- GraphicsPathIterator.cs
- FixedHyperLink.cs
- ToolStripControlHost.cs
- DeriveBytes.cs
- Matrix.cs
- MethodToken.cs
- DataGridViewCellStyle.cs
- FixedSOMElement.cs
- PeoplePickerWrapper.cs
- MimeObjectFactory.cs
- Vector3D.cs
- LocalValueEnumerator.cs
- FactoryMaker.cs
- ShapingWorkspace.cs
- EntityDataSourceSelectingEventArgs.cs
- JsonSerializer.cs
- GeneralTransform2DTo3D.cs
- SiteMapProvider.cs
- HttpListener.cs
- SimpleType.cs
- CheckPair.cs
- CellParaClient.cs
- DoubleAnimationBase.cs
- X509Certificate2.cs
- ValidationPropertyAttribute.cs
- ResourceExpressionEditorSheet.cs
- HttpListener.cs
- RegisterInfo.cs
- Rect.cs
- TrustSection.cs
- CompressedStack.cs
- CodeNamespaceImportCollection.cs
- future.cs
- _NTAuthentication.cs
- ListViewContainer.cs
- TableLayoutSettings.cs
- ClosableStream.cs
- Cursors.cs
- HashLookup.cs
- PathFigureCollectionValueSerializer.cs
- PageBreakRecord.cs
- ThousandthOfEmRealPoints.cs
- SoapObjectReader.cs
- NativeCppClassAttribute.cs
- CanonicalFontFamilyReference.cs
- ButtonBase.cs
- HelpInfo.cs
- SynchronizingStream.cs
- BinaryMethodMessage.cs
- HttpProfileGroupBase.cs
- ControlCachePolicy.cs
- WsatConfiguration.cs
- WindowsButton.cs
- FileDialogPermission.cs
- AutoResetEvent.cs
- UdpReplyToBehavior.cs
- NetMsmqBindingElement.cs
- BinaryObjectWriter.cs
- NavigationExpr.cs
- _DynamicWinsockMethods.cs
- ObjectItemConventionAssemblyLoader.cs