Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / CollectionConverter.cs / 1305376 / 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. ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SmiRequestExecutor.cs
- AttributeQuery.cs
- KnownTypeAttribute.cs
- PtsHost.cs
- LogAppendAsyncResult.cs
- GlyphInfoList.cs
- InvokeProviderWrapper.cs
- RootProfilePropertySettingsCollection.cs
- WindowHelperService.cs
- MenuAutomationPeer.cs
- HwndSourceKeyboardInputSite.cs
- Msmq4SubqueuePoisonHandler.cs
- Property.cs
- log.cs
- ObsoleteAttribute.cs
- UnhandledExceptionEventArgs.cs
- DocumentPageTextView.cs
- InternalCache.cs
- MetadataUtilsSmi.cs
- SignatureHelper.cs
- Int32CollectionConverter.cs
- OAVariantLib.cs
- Matrix3DValueSerializer.cs
- ReferencedCollectionType.cs
- HMACSHA384.cs
- SynchronizedInputHelper.cs
- MenuItemStyleCollection.cs
- ZeroOpNode.cs
- SoapReflector.cs
- DummyDataSource.cs
- ToolStripSeparatorRenderEventArgs.cs
- FilteredDataSetHelper.cs
- ContentPosition.cs
- ProfessionalColorTable.cs
- CompilationSection.cs
- ExpressionLexer.cs
- ManipulationDevice.cs
- VisualTreeUtils.cs
- SelectionEditor.cs
- Activator.cs
- NameValueFileSectionHandler.cs
- RightsManagementLicense.cs
- InternalRelationshipCollection.cs
- ScriptingSectionGroup.cs
- URIFormatException.cs
- ButtonFieldBase.cs
- _BasicClient.cs
- NameValueConfigurationCollection.cs
- WebPartUserCapability.cs
- FileDialogCustomPlace.cs
- GlyphElement.cs
- DoubleAnimation.cs
- WindowsAuthenticationModule.cs
- UrlRoutingHandler.cs
- XmlProcessingInstruction.cs
- UInt64.cs
- Size.cs
- Section.cs
- DataGridViewCellCancelEventArgs.cs
- Utils.cs
- PackUriHelper.cs
- ProxyWebPartManager.cs
- BrowserTree.cs
- SafeProcessHandle.cs
- HttpCookieCollection.cs
- Serialization.cs
- ScaleTransform3D.cs
- ProcessHostConfigUtils.cs
- Native.cs
- TextTreeTextNode.cs
- CodeGeneratorOptions.cs
- CodeAccessSecurityEngine.cs
- ActiveXSerializer.cs
- TextSegment.cs
- ModelItemCollectionImpl.cs
- Menu.cs
- RoutedEventConverter.cs
- DeadLetterQueue.cs
- ModelItemDictionaryImpl.cs
- DbXmlEnabledProviderManifest.cs
- ApplicationActivator.cs
- FilteredXmlReader.cs
- SQLInt32Storage.cs
- DateTimeConstantAttribute.cs
- ProfileParameter.cs
- BasicKeyConstraint.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- PartialList.cs
- DataObjectMethodAttribute.cs
- DomNameTable.cs
- CookielessHelper.cs
- StatusBar.cs
- JsonFormatReaderGenerator.cs
- TabControlAutomationPeer.cs
- TextTreeTextBlock.cs
- ECDiffieHellmanPublicKey.cs
- TransformGroup.cs
- TableColumn.cs
- HttpDictionary.cs
- ReliabilityContractAttribute.cs