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
- ChangePassword.cs
- SmiEventSink_Default.cs
- XmlDataSource.cs
- CodeValidator.cs
- regiisutil.cs
- Point3DKeyFrameCollection.cs
- RSAPKCS1KeyExchangeFormatter.cs
- SQLDouble.cs
- CommandLibraryHelper.cs
- ModifierKeysValueSerializer.cs
- ImmComposition.cs
- XmlSchemaSequence.cs
- ISAPIWorkerRequest.cs
- TemplateColumn.cs
- KeyMatchBuilder.cs
- TemplateInstanceAttribute.cs
- EnvelopedPkcs7.cs
- Vars.cs
- SQLInt16.cs
- ZipFileInfoCollection.cs
- QueryableDataSource.cs
- ProxySimple.cs
- ConfigXmlReader.cs
- GPStream.cs
- WindowsListViewGroup.cs
- FocusWithinProperty.cs
- HtmlInputPassword.cs
- QueryCacheKey.cs
- RichTextBox.cs
- DuplicateWaitObjectException.cs
- EventProviderWriter.cs
- _NegoState.cs
- PropertyKey.cs
- GenericNameHandler.cs
- IPEndPoint.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- DeclarativeConditionsCollection.cs
- ExpressionBindings.cs
- ReplyChannelBinder.cs
- ListManagerBindingsCollection.cs
- FileLogRecordStream.cs
- Predicate.cs
- SessionStateContainer.cs
- Line.cs
- CodeGotoStatement.cs
- TemplateField.cs
- ElementProxy.cs
- TextContainerHelper.cs
- TcpChannelHelper.cs
- ResXBuildProvider.cs
- TransformationRules.cs
- Send.cs
- UpdatePanelControlTrigger.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- AppearanceEditorPart.cs
- ImmutableAssemblyCacheEntry.cs
- DataProtection.cs
- HttpMethodAttribute.cs
- ApplicationSecurityInfo.cs
- ExtendLockCommand.cs
- SendMailErrorEventArgs.cs
- WebBrowserBase.cs
- RegexNode.cs
- RoutedEventHandlerInfo.cs
- DataControlButton.cs
- SqlXml.cs
- IERequestCache.cs
- XDRSchema.cs
- DbReferenceCollection.cs
- PropertyGridView.cs
- ExtendedPropertyDescriptor.cs
- PropertyToken.cs
- FormsAuthenticationCredentials.cs
- StylusPointCollection.cs
- InvalidDataException.cs
- OneOfScalarConst.cs
- OdbcParameterCollection.cs
- OracleDataAdapter.cs
- EngineSite.cs
- BaseCollection.cs
- LinkConverter.cs
- DataRow.cs
- XmlWriterTraceListener.cs
- OpenFileDialog.cs
- FastPropertyAccessor.cs
- Identity.cs
- Debug.cs
- IItemContainerGenerator.cs
- StreamGeometry.cs
- EntityDataSourceSelectingEventArgs.cs
- ProxyAttribute.cs
- MenuItemCollection.cs
- EastAsianLunisolarCalendar.cs
- SessionPageStateSection.cs
- ConfigurationStrings.cs
- Types.cs
- SecurityDocument.cs
- ExpressionBuilder.cs
- DataRelationPropertyDescriptor.cs
- WmpBitmapDecoder.cs