Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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; } } }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
- GeneralTransform2DTo3DTo2D.cs
- GridViewPageEventArgs.cs
- GlyphCache.cs
- ProtocolsConfigurationEntry.cs
- TextEditorSpelling.cs
- Crypto.cs
- GroupBox.cs
- ProxyGenerator.cs
- ContextMenu.cs
- ChangePasswordAutoFormat.cs
- FamilyMap.cs
- GenericPrincipal.cs
- XmlSchemaAnnotation.cs
- StaticFileHandler.cs
- IxmlLineInfo.cs
- DbDataRecord.cs
- ObjectFullSpanRewriter.cs
- InternalControlCollection.cs
- HierarchicalDataBoundControl.cs
- ZoneLinkButton.cs
- DbReferenceCollection.cs
- CodeAccessSecurityEngine.cs
- DrawingImage.cs
- PeerNameRecord.cs
- LOSFormatter.cs
- BinaryNode.cs
- SqlProcedureAttribute.cs
- RuntimeConfig.cs
- FreezableCollection.cs
- TreeViewTemplateSelector.cs
- HttpPostServerProtocol.cs
- VariantWrapper.cs
- EventArgs.cs
- PasswordBox.cs
- BitmapSizeOptions.cs
- DataSysAttribute.cs
- ResourceReferenceExpression.cs
- SqlWorkflowInstanceStoreLock.cs
- BorderGapMaskConverter.cs
- InkCanvasSelection.cs
- StringSorter.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- UniformGrid.cs
- SafeLibraryHandle.cs
- CorrelationTokenInvalidatedHandler.cs
- MessageContractImporter.cs
- BamlRecordWriter.cs
- KeyValueSerializer.cs
- ComponentFactoryHelpers.cs
- ListViewDeletedEventArgs.cs
- ProviderCommandInfoUtils.cs
- QuaternionAnimation.cs
- AudioFormatConverter.cs
- ScrollItemPattern.cs
- DataServiceQueryException.cs
- GridViewSortEventArgs.cs
- EntityContainerAssociationSetEnd.cs
- NetNamedPipeSecurityElement.cs
- ColumnMapCopier.cs
- BindingSource.cs
- ServiceDescriptionSerializer.cs
- PersistenceTypeAttribute.cs
- GenerateScriptTypeAttribute.cs
- CompositionTarget.cs
- CounterSample.cs
- Stacktrace.cs
- PaintEvent.cs
- LinqDataSource.cs
- QueryCacheKey.cs
- HierarchicalDataSourceControl.cs
- InvalidFilterCriteriaException.cs
- InvalidDocumentContentsException.cs
- EntityContainerAssociationSet.cs
- ColumnMapCopier.cs
- UnsafeNativeMethodsMilCoreApi.cs
- TabItemAutomationPeer.cs
- SimpleTypeResolver.cs
- TraceEventCache.cs
- TextEffect.cs
- BindingMemberInfo.cs
- WorkflowShape.cs
- TextEditorCharacters.cs
- JoinGraph.cs
- Int32CollectionValueSerializer.cs
- SingleTagSectionHandler.cs
- SqlProvider.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- Journaling.cs
- DataServiceContext.cs
- WebDescriptionAttribute.cs
- CompositeDataBoundControl.cs
- TextEndOfParagraph.cs
- CodePrimitiveExpression.cs
- InstancePersistenceException.cs
- PublisherIdentityPermission.cs
- DoubleAnimationClockResource.cs
- ReadOnlyDictionary.cs
- StreamSecurityUpgradeAcceptor.cs
- RequestDescription.cs
- ObjectConverter.cs