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
- WorkflowMessageEventHandler.cs
- ConnectionModeReader.cs
- WindowsStatusBar.cs
- CodeGenerator.cs
- UnaryNode.cs
- SecuritySessionSecurityTokenAuthenticator.cs
- ScriptReferenceEventArgs.cs
- WebPartConnectionsCloseVerb.cs
- StateValidator.cs
- TagNameToTypeMapper.cs
- FixedSOMImage.cs
- RuntimeCompatibilityAttribute.cs
- JapaneseCalendar.cs
- ScriptControlDescriptor.cs
- ListItemCollection.cs
- XmlSchemaException.cs
- ControlIdConverter.cs
- CacheDependency.cs
- FormsAuthenticationCredentials.cs
- RegisteredScript.cs
- AccessViolationException.cs
- CompensationDesigner.cs
- DataPager.cs
- PropertyRef.cs
- ExternalDataExchangeService.cs
- BuildDependencySet.cs
- SortedDictionary.cs
- ProjectionCamera.cs
- XmlAttributeOverrides.cs
- ReverseInheritProperty.cs
- SoapEnumAttribute.cs
- CompositeKey.cs
- assemblycache.cs
- BatchParser.cs
- TypeLoadException.cs
- DrawingContextDrawingContextWalker.cs
- FontWeightConverter.cs
- ClientSideProviderDescription.cs
- OLEDB_Enum.cs
- ConnectionPoolManager.cs
- TextRange.cs
- TabControlEvent.cs
- CodeLabeledStatement.cs
- figurelength.cs
- SystemThemeKey.cs
- NativeMethods.cs
- GeneralTransform.cs
- CellQuery.cs
- NativeMethodsOther.cs
- AttributeData.cs
- RadioButtonRenderer.cs
- Paragraph.cs
- ColorKeyFrameCollection.cs
- ListViewItem.cs
- Byte.cs
- WebPartDisplayModeCollection.cs
- BamlReader.cs
- CopyCodeAction.cs
- DatagridviewDisplayedBandsData.cs
- ToolboxItemFilterAttribute.cs
- DataViewManager.cs
- TableRowCollection.cs
- TrackingServices.cs
- XsltException.cs
- HostedTcpTransportManager.cs
- DictionaryChange.cs
- XmlIgnoreAttribute.cs
- ParallelLoopState.cs
- sapiproxy.cs
- FastPropertyAccessor.cs
- SuspendDesigner.cs
- MergablePropertyAttribute.cs
- OracleConnection.cs
- DrawListViewColumnHeaderEventArgs.cs
- CellLabel.cs
- DropTarget.cs
- ThousandthOfEmRealDoubles.cs
- AxHost.cs
- externdll.cs
- SpotLight.cs
- FormViewPageEventArgs.cs
- RadioButtonStandardAdapter.cs
- RightNameExpirationInfoPair.cs
- HostProtectionException.cs
- RequestCacheManager.cs
- FormClosingEvent.cs
- PrintControllerWithStatusDialog.cs
- VersionPair.cs
- DataGridViewCellFormattingEventArgs.cs
- ImageAnimator.cs
- TableAdapterManagerGenerator.cs
- SmiMetaData.cs
- TextModifierScope.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- arabicshape.cs
- DES.cs
- LogFlushAsyncResult.cs
- WindowsNonControl.cs
- DifferencingCollection.cs
- KeyValueSerializer.cs