Code:
/ FX-1434 / FX-1434 / 1.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
- MenuItemAutomationPeer.cs
- GenericEnumerator.cs
- TransactionScope.cs
- TableRow.cs
- XmlDataLoader.cs
- DataGridTextBox.cs
- ScriptHandlerFactory.cs
- DataGridViewAdvancedBorderStyle.cs
- ActivitySurrogate.cs
- IIS7UserPrincipal.cs
- EntityContainer.cs
- sqlmetadatafactory.cs
- SamlConditions.cs
- Subset.cs
- XmlKeywords.cs
- OpCodes.cs
- BaseUriWithWildcard.cs
- ProjectedWrapper.cs
- VectorConverter.cs
- ToReply.cs
- CellParagraph.cs
- XhtmlBasicValidationSummaryAdapter.cs
- ScriptControlManager.cs
- DescendentsWalkerBase.cs
- MailBnfHelper.cs
- SectionVisual.cs
- StateItem.cs
- DefaultPrintController.cs
- XmlHierarchyData.cs
- XmlElementList.cs
- DataGridViewRow.cs
- Fonts.cs
- TableLayoutStyleCollection.cs
- SqlParameter.cs
- EntityTypeEmitter.cs
- XPathNodeIterator.cs
- HttpListenerContext.cs
- ProfileInfo.cs
- EmissiveMaterial.cs
- IPGlobalProperties.cs
- SessionState.cs
- Overlapped.cs
- LastQueryOperator.cs
- BaseTemplateParser.cs
- ConfigurationPropertyCollection.cs
- _SslSessionsCache.cs
- ImageProxy.cs
- DbExpressionRules.cs
- SHA256Cng.cs
- RuntimeArgumentHandle.cs
- ThreadAttributes.cs
- AsyncStreamReader.cs
- SqlDataSourceView.cs
- UIPropertyMetadata.cs
- BufferBuilder.cs
- __Filters.cs
- CornerRadius.cs
- TimersDescriptionAttribute.cs
- Membership.cs
- MatrixAnimationUsingKeyFrames.cs
- XmlTextReaderImpl.cs
- ResponseBodyWriter.cs
- AuthenticationSection.cs
- ProfileGroupSettingsCollection.cs
- DataViewManagerListItemTypeDescriptor.cs
- RunClient.cs
- AssemblyBuilder.cs
- DesignerSerializationVisibilityAttribute.cs
- Attributes.cs
- TextBoxBase.cs
- ToolStripStatusLabel.cs
- SystemWebCachingSectionGroup.cs
- CatalogPartChrome.cs
- DataGridViewRowConverter.cs
- InputGestureCollection.cs
- SpecialNameAttribute.cs
- MustUnderstandSoapException.cs
- VirtualDirectoryMapping.cs
- DesignerAutoFormatCollection.cs
- DebugView.cs
- PictureBoxDesigner.cs
- TranslateTransform3D.cs
- IdentitySection.cs
- UnionCodeGroup.cs
- SemanticBasicElement.cs
- RawTextInputReport.cs
- MarkerProperties.cs
- DESCryptoServiceProvider.cs
- InvalidateEvent.cs
- QueryableFilterRepeater.cs
- DataGridColumnFloatingHeader.cs
- CodeAccessSecurityEngine.cs
- DataShape.cs
- ItemCheckEvent.cs
- DbgCompiler.cs
- EntityDataSourceContextDisposingEventArgs.cs
- DataServiceQueryOfT.cs
- TextDecorationCollection.cs
- DataServiceKeyAttribute.cs
- WebPartExportVerb.cs