Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / CompMod / System / ComponentModel / CollectionConverter.cs / 1 / CollectionConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using Microsoft.Win32; using System.Collections; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Runtime.Serialization.Formatters; using System.Runtime.Remoting; using System.Runtime.InteropServices; using System.Security.Permissions; ////// [HostProtection(SharedState = true)] public class CollectionConverter : TypeConverter { ///Provides a type converter to convert /// collection objects to and from various other representations. ////// public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == null) { throw new ArgumentNullException("destinationType"); } if (destinationType == typeof(string)) { if (value is ICollection) { return SR.GetString(SR.CollectionConverterText); } } return base.ConvertTo(context, culture, value, destinationType); } ///Converts the given /// value object to the /// specified destination type. ////// public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { //return new PropertyDescriptorCollection(null); return null; } ///Gets a collection of properties for /// the type of array specified by the value parameter using the specified context and /// attributes. ////// public override bool GetPropertiesSupported(ITypeDescriptorContext context) { return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //Gets a value indicating whether this object /// supports properties. ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using Microsoft.Win32; using System.Collections; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Runtime.Serialization.Formatters; using System.Runtime.Remoting; using System.Runtime.InteropServices; using System.Security.Permissions; ////// [HostProtection(SharedState = true)] public class CollectionConverter : TypeConverter { ///Provides a type converter to convert /// collection objects to and from various other representations. ////// public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == null) { throw new ArgumentNullException("destinationType"); } if (destinationType == typeof(string)) { if (value is ICollection) { return SR.GetString(SR.CollectionConverterText); } } return base.ConvertTo(context, culture, value, destinationType); } ///Converts the given /// value object to the /// specified destination type. ////// public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { //return new PropertyDescriptorCollection(null); return null; } ///Gets a collection of properties for /// the type of array specified by the value parameter using the specified context and /// attributes. ////// public override bool GetPropertiesSupported(ITypeDescriptorContext context) { return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Gets a value indicating whether this object /// supports properties. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Message.cs
- OverflowException.cs
- _NtlmClient.cs
- InternalConfigConfigurationFactory.cs
- XsltLibrary.cs
- InternalEnumValidatorAttribute.cs
- URI.cs
- MissingManifestResourceException.cs
- QilReplaceVisitor.cs
- DataGridColumn.cs
- RootBrowserWindow.cs
- TemporaryBitmapFile.cs
- AdPostCacheSubstitution.cs
- ScriptingScriptResourceHandlerSection.cs
- precedingsibling.cs
- XmlSchema.cs
- SystemDiagnosticsSection.cs
- PointF.cs
- QueuePropertyVariants.cs
- ListView.cs
- AnnouncementClient.cs
- SubMenuStyle.cs
- QuaternionKeyFrameCollection.cs
- _ChunkParse.cs
- HwndSourceParameters.cs
- CommandConverter.cs
- Operators.cs
- ComAdminInterfaces.cs
- ImageList.cs
- ElementHostAutomationPeer.cs
- _ScatterGatherBuffers.cs
- KoreanCalendar.cs
- SystemIcmpV6Statistics.cs
- XmlTextReaderImplHelpers.cs
- BamlStream.cs
- GradientStopCollection.cs
- DbProviderFactories.cs
- InputScopeAttribute.cs
- DataGridViewUtilities.cs
- IdentitySection.cs
- AppDomainManager.cs
- TextUtf8RawTextWriter.cs
- WebPartCancelEventArgs.cs
- DataSourceConverter.cs
- StringExpressionSet.cs
- ClientRuntimeConfig.cs
- FastEncoder.cs
- ConcurrencyMode.cs
- ConcurrentBag.cs
- DataGridViewCellStyleBuilderDialog.cs
- DesignerDataParameter.cs
- AuthStoreRoleProvider.cs
- Attributes.cs
- InputBindingCollection.cs
- HttpConfigurationContext.cs
- EdmScalarPropertyAttribute.cs
- SqlDataSourceCustomCommandPanel.cs
- XmlSchemaAnyAttribute.cs
- cookiecontainer.cs
- ElementNotEnabledException.cs
- QilInvokeEarlyBound.cs
- XamlFrame.cs
- ContactManager.cs
- LicenseProviderAttribute.cs
- ReferenceConverter.cs
- Version.cs
- CodeCatchClause.cs
- XmlSerializationReader.cs
- QueryGeneratorBase.cs
- documentation.cs
- PointHitTestParameters.cs
- ProjectionPlanCompiler.cs
- XmlReaderDelegator.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- DelayDesigner.cs
- PathStreamGeometryContext.cs
- CssStyleCollection.cs
- FileVersionInfo.cs
- InlineObject.cs
- OLEDB_Enum.cs
- XPathNodeInfoAtom.cs
- Font.cs
- XamlStyleSerializer.cs
- XPathNodeIterator.cs
- ProcessHostFactoryHelper.cs
- BamlStream.cs
- OrderingExpression.cs
- ComboBox.cs
- RoleManagerEventArgs.cs
- embossbitmapeffect.cs
- SubMenuStyle.cs
- ManipulationStartingEventArgs.cs
- Encoder.cs
- EnvelopedSignatureTransform.cs
- ProcessModuleDesigner.cs
- ConditionCollection.cs
- ProfileWorkflowElement.cs
- RSACryptoServiceProvider.cs
- TimelineClockCollection.cs
- WebPartActionVerb.cs