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
- RowVisual.cs
- ListSortDescriptionCollection.cs
- Exceptions.cs
- AgileSafeNativeMemoryHandle.cs
- DbExpressionVisitor_TResultType.cs
- CommandEventArgs.cs
- BCLDebug.cs
- AttachedAnnotation.cs
- PropertyValueEditor.cs
- EventProviderWriter.cs
- SrgsSubset.cs
- BindingMemberInfo.cs
- DocumentScope.cs
- PolygonHotSpot.cs
- FontFamily.cs
- ElementAction.cs
- AttachmentCollection.cs
- XmlSchemaChoice.cs
- WebDisplayNameAttribute.cs
- WrappedReader.cs
- DBSchemaRow.cs
- BitmapEffectDrawing.cs
- WindowsSysHeader.cs
- PenLineJoinValidation.cs
- CatalogPart.cs
- WindowsTokenRoleProvider.cs
- HttpModuleCollection.cs
- ReflectEventDescriptor.cs
- SystemWebSectionGroup.cs
- ListMarkerLine.cs
- OleDbPropertySetGuid.cs
- MissingManifestResourceException.cs
- XPathNodeInfoAtom.cs
- TextDecorations.cs
- TextLineResult.cs
- ProxyHelper.cs
- MaskedTextBoxDesigner.cs
- TypeToken.cs
- TextParagraph.cs
- MenuItem.cs
- XmlName.cs
- DataGridViewComboBoxColumnDesigner.cs
- PresentationAppDomainManager.cs
- CSharpCodeProvider.cs
- _KerberosClient.cs
- TextParaClient.cs
- WS2007FederationHttpBindingCollectionElement.cs
- SamlAssertion.cs
- ImageMap.cs
- PointCollection.cs
- InstanceKeyCollisionException.cs
- IndependentAnimationStorage.cs
- DESCryptoServiceProvider.cs
- ItemList.cs
- XPathAxisIterator.cs
- Size.cs
- TitleStyle.cs
- XmlSchemaCollection.cs
- AuthorizationSection.cs
- JsonByteArrayDataContract.cs
- InheritanceContextHelper.cs
- PackageRelationship.cs
- RecordManager.cs
- RtfToken.cs
- PerformanceCounterPermissionEntry.cs
- PageThemeCodeDomTreeGenerator.cs
- Win32PrintDialog.cs
- XmlDataSource.cs
- Literal.cs
- SplineQuaternionKeyFrame.cs
- XmlDownloadManager.cs
- Point3DAnimation.cs
- DriveInfo.cs
- DiagnosticTrace.cs
- PolyLineSegment.cs
- ContentElementAutomationPeer.cs
- XmlSchemaSimpleContentRestriction.cs
- BrowserCapabilitiesFactoryBase.cs
- ApplicationServiceManager.cs
- ImageBrush.cs
- InvalidOperationException.cs
- IgnoreSectionHandler.cs
- ToolStripDropDownButton.cs
- MultiAsyncResult.cs
- LinqDataSourceUpdateEventArgs.cs
- BuilderInfo.cs
- SelectionHighlightInfo.cs
- HeaderedItemsControl.cs
- HwndTarget.cs
- PeekCompletedEventArgs.cs
- SafeNativeMethods.cs
- SymbolMethod.cs
- ContextConfiguration.cs
- UpdatePanelTrigger.cs
- DelegateHelpers.Generated.cs
- NativeMethods.cs
- ProviderException.cs
- ImageSource.cs
- InternalTypeHelper.cs
- FixedPageAutomationPeer.cs