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
- XmlSchemaCompilationSettings.cs
- WriteFileContext.cs
- TextTreeText.cs
- XsltArgumentList.cs
- TableCellAutomationPeer.cs
- DeflateEmulationStream.cs
- BitArray.cs
- OrderedParallelQuery.cs
- AudienceUriMode.cs
- IListConverters.cs
- CreateUserWizard.cs
- LinqToSqlWrapper.cs
- CompModHelpers.cs
- XsdValidatingReader.cs
- ColorMap.cs
- ConditionCollection.cs
- DataGridColumnFloatingHeader.cs
- CacheRequest.cs
- TraceContext.cs
- Profiler.cs
- SettingsBindableAttribute.cs
- SimpleTextLine.cs
- DataGridViewCellStyle.cs
- EdmType.cs
- BinHexDecoder.cs
- DelegatedStream.cs
- LinqToSqlWrapper.cs
- PermissionListSet.cs
- TextElement.cs
- DataFormats.cs
- ErrorsHelper.cs
- ExpandSegmentCollection.cs
- XmlImplementation.cs
- CharacterBufferReference.cs
- GridToolTip.cs
- TreeNodeClickEventArgs.cs
- TransactionChannelListener.cs
- LineVisual.cs
- DefaultValueTypeConverter.cs
- CoTaskMemSafeHandle.cs
- UnaryQueryOperator.cs
- DrawListViewItemEventArgs.cs
- NavigationWindowAutomationPeer.cs
- RecognizeCompletedEventArgs.cs
- MouseDevice.cs
- SessionState.cs
- FixedTextBuilder.cs
- WebPartConnectionsCloseVerb.cs
- WindowsRichEditRange.cs
- SlotInfo.cs
- WebPartTracker.cs
- SmtpDateTime.cs
- SimpleHandlerFactory.cs
- AtlasWeb.Designer.cs
- SamlSecurityToken.cs
- URLBuilder.cs
- NamespaceDecl.cs
- HttpHandlersSection.cs
- hresults.cs
- Publisher.cs
- VerticalAlignConverter.cs
- IteratorFilter.cs
- ClientCultureInfo.cs
- CodeIterationStatement.cs
- GraphicsState.cs
- Int16Converter.cs
- EtwTrace.cs
- Delegate.cs
- Attributes.cs
- SettingsAttributes.cs
- DoubleIndependentAnimationStorage.cs
- PropertyEmitterBase.cs
- Vector3DValueSerializer.cs
- Group.cs
- CachedFontFace.cs
- SingleKeyFrameCollection.cs
- WebServiceFaultDesigner.cs
- DrawingAttributes.cs
- MouseEventArgs.cs
- PersistenceException.cs
- AppDomainManager.cs
- AxisAngleRotation3D.cs
- ReadContentAsBinaryHelper.cs
- XmlSignificantWhitespace.cs
- DbInsertCommandTree.cs
- ArcSegment.cs
- ZipArchive.cs
- CodeBlockBuilder.cs
- ShaderEffect.cs
- DtrList.cs
- Gdiplus.cs
- InitializationEventAttribute.cs
- QueryExtender.cs
- WebHttpDispatchOperationSelector.cs
- XmlWriter.cs
- SafeNativeMethods.cs
- AnnouncementEndpointElement.cs
- TextBoxRenderer.cs
- bindurihelper.cs
- CodeNamespaceImportCollection.cs