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
- LineInfo.cs
- TransportSecurityBindingElement.cs
- CheckBoxList.cs
- ObjectListCommand.cs
- WindowsTokenRoleProvider.cs
- UriTemplateClientFormatter.cs
- RepeaterItemEventArgs.cs
- Ipv6Element.cs
- PersonalizationStateInfoCollection.cs
- _ShellExpression.cs
- ColorTransform.cs
- CqlBlock.cs
- RichTextBox.cs
- ColumnClickEvent.cs
- PolicyDesigner.cs
- DoubleStorage.cs
- BaseCollection.cs
- CharacterMetricsDictionary.cs
- LocationReference.cs
- XmlAtomicValue.cs
- OperatingSystem.cs
- HostVisual.cs
- CoreSwitches.cs
- TdsParserStateObject.cs
- LinkGrep.cs
- Maps.cs
- ClientFactory.cs
- BrowsableAttribute.cs
- ExternalCalls.cs
- EntityDataSourceContextCreatingEventArgs.cs
- ResXResourceReader.cs
- XmlValueConverter.cs
- HttpWebResponse.cs
- TextTrailingCharacterEllipsis.cs
- FormViewUpdateEventArgs.cs
- ResourceContainer.cs
- MessageProperties.cs
- ProjectionPathBuilder.cs
- FileLoadException.cs
- KeysConverter.cs
- IssuedTokenClientCredential.cs
- DataServiceQueryProvider.cs
- FontFamilyIdentifier.cs
- XmlSchemaSequence.cs
- FormParameter.cs
- RoutedPropertyChangedEventArgs.cs
- TableLayoutSettingsTypeConverter.cs
- ResourceIDHelper.cs
- SqlCrossApplyToCrossJoin.cs
- Validator.cs
- EventDescriptor.cs
- RemotingAttributes.cs
- AnnotationResource.cs
- DocumentPageView.cs
- BatchWriter.cs
- DecoderBestFitFallback.cs
- DiffuseMaterial.cs
- PropertyRecord.cs
- XPathAncestorQuery.cs
- CellRelation.cs
- GlyphCollection.cs
- SQLDateTimeStorage.cs
- ModelUIElement3D.cs
- PersonalizationAdministration.cs
- TailCallAnalyzer.cs
- SpellerHighlightLayer.cs
- Exceptions.cs
- AsyncStreamReader.cs
- SrgsRule.cs
- DependencyPropertyAttribute.cs
- LeaseManager.cs
- MarkupProperty.cs
- BinaryObjectInfo.cs
- BamlTreeNode.cs
- DesignSurface.cs
- WorkflowMarkupElementEventArgs.cs
- XslCompiledTransform.cs
- PopupEventArgs.cs
- RegexCode.cs
- ExpandSegmentCollection.cs
- SurrogateChar.cs
- SqlBooleanMismatchVisitor.cs
- BrowserDefinition.cs
- ToolStripPanelDesigner.cs
- CorrelationRequestContext.cs
- WriterOutput.cs
- AnnotationComponentChooser.cs
- SafeCertificateContext.cs
- DeclarationUpdate.cs
- BamlRecordHelper.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ObjectListField.cs
- SmtpLoginAuthenticationModule.cs
- RequiredAttributeAttribute.cs
- DBCSCodePageEncoding.cs
- QueryContinueDragEvent.cs
- MeasureItemEvent.cs
- BitmapPalettes.cs
- VisualTarget.cs