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
- MergablePropertyAttribute.cs
- SecurityException.cs
- TimeSpanConverter.cs
- DynamicMethod.cs
- CodePageUtils.cs
- Script.cs
- HScrollProperties.cs
- DataGridViewCellValueEventArgs.cs
- CacheModeValueSerializer.cs
- TreeNodeEventArgs.cs
- GroupItemAutomationPeer.cs
- PropertyRecord.cs
- TypeDependencyAttribute.cs
- AnimationTimeline.cs
- RSATokenProvider.cs
- FormViewCommandEventArgs.cs
- WebPartDisplayModeCancelEventArgs.cs
- ValueProviderWrapper.cs
- AccessDataSourceView.cs
- BitmapData.cs
- ObjectDisposedException.cs
- ButtonChrome.cs
- Function.cs
- ButtonAutomationPeer.cs
- ListBoxItemAutomationPeer.cs
- MsmqElementBase.cs
- IMembershipProvider.cs
- Utils.cs
- FixedSOMImage.cs
- OrderedDictionary.cs
- JsonDeserializer.cs
- FullTextLine.cs
- XsdDateTime.cs
- EntityDataSourceChangingEventArgs.cs
- ItemMap.cs
- WorkflowInstanceRecord.cs
- ConfigurationManagerInternal.cs
- BoolExpr.cs
- LayoutTable.cs
- RemotingConfiguration.cs
- HtmlValidationSummaryAdapter.cs
- HMACSHA512.cs
- ObjectDataSourceEventArgs.cs
- ProvidersHelper.cs
- SweepDirectionValidation.cs
- CurrencyWrapper.cs
- Point3DIndependentAnimationStorage.cs
- HashCoreRequest.cs
- LazyTextWriterCreator.cs
- ErrorTableItemStyle.cs
- ConfigurationValidatorBase.cs
- ProbeDuplexAsyncResult.cs
- CaseInsensitiveOrdinalStringComparer.cs
- DetailsViewInsertedEventArgs.cs
- FlowDocumentReader.cs
- Comparer.cs
- XmlAutoDetectWriter.cs
- XmlUrlEditor.cs
- RandomDelaySendsAsyncResult.cs
- ScriptIgnoreAttribute.cs
- LZCodec.cs
- GridViewRowEventArgs.cs
- Point3D.cs
- XPathNodeIterator.cs
- FunctionOverloadResolver.cs
- CommandManager.cs
- CriticalFinalizerObject.cs
- BaseValidatorDesigner.cs
- ImmutableCollection.cs
- CommonDialog.cs
- ObjectListGeneralPage.cs
- DispatcherObject.cs
- WrapPanel.cs
- NextPreviousPagerField.cs
- RequestCachingSection.cs
- VirtualPathUtility.cs
- CurrencyWrapper.cs
- Message.cs
- SuppressMessageAttribute.cs
- InstalledFontCollection.cs
- x509store.cs
- XPathDocument.cs
- ElapsedEventArgs.cs
- MenuItemBinding.cs
- DataSourceSerializationException.cs
- ListView.cs
- HelpEvent.cs
- SafeViewOfFileHandle.cs
- NumberFunctions.cs
- EditorPartCollection.cs
- ToolboxItemFilterAttribute.cs
- _Connection.cs
- PointCollection.cs
- HtmlHead.cs
- WindowsSecurityToken.cs
- PixelFormats.cs
- DataColumnCollection.cs
- TreeBuilderBamlTranslator.cs
- TextViewBase.cs
- DataSourceComponent.cs