Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- IriParsingElement.cs
- JpegBitmapDecoder.cs
- QueryCursorEventArgs.cs
- AssociativeAggregationOperator.cs
- PageRequestManager.cs
- RuntimeResourceSet.cs
- ObjectViewEntityCollectionData.cs
- WpfGeneratedKnownTypes.cs
- UrlAuthorizationModule.cs
- ResourceReader.cs
- Cursors.cs
- X509Certificate.cs
- WmlPanelAdapter.cs
- SqlReferenceCollection.cs
- HttpClientCertificate.cs
- ProfileGroupSettingsCollection.cs
- TextEncodedRawTextWriter.cs
- JavaScriptSerializer.cs
- HostedTransportConfigurationManager.cs
- Rfc2898DeriveBytes.cs
- MailDefinition.cs
- DragEventArgs.cs
- XPathNavigatorReader.cs
- XmlSchemaAppInfo.cs
- ParameterCollectionEditor.cs
- TextEmbeddedObject.cs
- DesignerAttribute.cs
- DecoratedNameAttribute.cs
- BindingExpression.cs
- VectorCollection.cs
- SemaphoreSlim.cs
- TraceHwndHost.cs
- ProcessManager.cs
- InternalConfigHost.cs
- _DigestClient.cs
- CrossAppDomainChannel.cs
- ValidationEventArgs.cs
- WebPartTransformerAttribute.cs
- SelectionEditingBehavior.cs
- SystemIPAddressInformation.cs
- PKCS1MaskGenerationMethod.cs
- EntityContainer.cs
- ContainerControlDesigner.cs
- ToolStripDropDownClosedEventArgs.cs
- DataGridViewColumnConverter.cs
- HTMLTextWriter.cs
- TemplateColumn.cs
- GlyphInfoList.cs
- XmlILTrace.cs
- DisplayInformation.cs
- HostingEnvironment.cs
- Point4D.cs
- TagMapCollection.cs
- HeaderLabel.cs
- ListCollectionView.cs
- LoadRetryStrategyFactory.cs
- ComplexPropertyEntry.cs
- ArrayExtension.cs
- MulticastNotSupportedException.cs
- ControlDesigner.cs
- NotImplementedException.cs
- Int32Converter.cs
- RSAProtectedConfigurationProvider.cs
- Types.cs
- Marshal.cs
- XmlWrappingWriter.cs
- InputLanguageProfileNotifySink.cs
- CheckBoxField.cs
- GridViewSortEventArgs.cs
- X509AsymmetricSecurityKey.cs
- ParameterCollectionEditorForm.cs
- InternalDuplexBindingElement.cs
- AsymmetricSignatureFormatter.cs
- TypePresenter.xaml.cs
- ByteArrayHelperWithString.cs
- EntityType.cs
- ItemsControlAutomationPeer.cs
- NetworkInformationException.cs
- EdmError.cs
- Section.cs
- BaseResourcesBuildProvider.cs
- BindMarkupExtensionSerializer.cs
- ButtonColumn.cs
- FieldToken.cs
- Ref.cs
- DataServiceException.cs
- ProgressBarHighlightConverter.cs
- MarginCollapsingState.cs
- SubclassTypeValidator.cs
- LoadGrammarCompletedEventArgs.cs
- GetWinFXPath.cs
- XPathDocumentIterator.cs
- Menu.cs
- EntityDataSourceContextCreatingEventArgs.cs
- QilGenerator.cs
- ObservableDictionary.cs
- Int32CollectionValueSerializer.cs
- RTLAwareMessageBox.cs
- UserControlParser.cs
- Matrix.cs