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
- CodeMemberProperty.cs
- Baml6ConstructorInfo.cs
- _NestedSingleAsyncResult.cs
- AppLevelCompilationSectionCache.cs
- TabControlEvent.cs
- DataGridViewSelectedColumnCollection.cs
- XmlnsDefinitionAttribute.cs
- QilTypeChecker.cs
- NavigationService.cs
- MergePropertyDescriptor.cs
- XmlAttributeAttribute.cs
- EraserBehavior.cs
- FacetEnabledSchemaElement.cs
- ComplexPropertyEntry.cs
- CompatibleComparer.cs
- MetadataSerializer.cs
- Win32.cs
- HtmlForm.cs
- TraceHandlerErrorFormatter.cs
- WindowsStatic.cs
- SubpageParagraph.cs
- DesignTimeVisibleAttribute.cs
- SignedXmlDebugLog.cs
- XmlObjectSerializerReadContext.cs
- DependencyStoreSurrogate.cs
- PieceDirectory.cs
- ReferentialConstraintRoleElement.cs
- DataGridViewColumn.cs
- PenThreadPool.cs
- ScrollPatternIdentifiers.cs
- ResponseBodyWriter.cs
- StrokeIntersection.cs
- PlanCompilerUtil.cs
- Color.cs
- HostedNamedPipeTransportManager.cs
- DocumentApplication.cs
- SpellerHighlightLayer.cs
- DispatchOperationRuntime.cs
- DrawingContextWalker.cs
- BindingCompleteEventArgs.cs
- WorkflowInstanceQuery.cs
- WindowsPrincipal.cs
- CodeDirectiveCollection.cs
- XmlReader.cs
- SafeNativeMethodsOther.cs
- DispatcherObject.cs
- SecurityPermission.cs
- AsymmetricSecurityBindingElement.cs
- TextSpanModifier.cs
- DataBoundControlAdapter.cs
- Error.cs
- CryptoKeySecurity.cs
- PropertyItem.cs
- InputReport.cs
- ImageCodecInfo.cs
- Zone.cs
- CodeAttributeArgument.cs
- MultipartIdentifier.cs
- SqlCrossApplyToCrossJoin.cs
- XmlNodeComparer.cs
- AmbientProperties.cs
- FlowLayout.cs
- ConfigXmlSignificantWhitespace.cs
- ReadOnlyDataSourceView.cs
- GroupStyle.cs
- FragmentQueryProcessor.cs
- XmlDataSourceView.cs
- GridToolTip.cs
- DelegateBodyWriter.cs
- Parameter.cs
- MeshGeometry3D.cs
- SqlServices.cs
- EllipseGeometry.cs
- CharacterMetricsDictionary.cs
- DataGridViewComboBoxEditingControl.cs
- ToolStripOverflow.cs
- DebuggerAttributes.cs
- NumericPagerField.cs
- Literal.cs
- FormViewInsertedEventArgs.cs
- util.cs
- DataSourceHelper.cs
- RenderOptions.cs
- _SslState.cs
- SQLBytesStorage.cs
- ThreadAttributes.cs
- SerialErrors.cs
- EndEvent.cs
- FormView.cs
- XPathNavigatorReader.cs
- InteropBitmapSource.cs
- ResizeGrip.cs
- AssemblyBuilder.cs
- MethodCallExpression.cs
- TableCellAutomationPeer.cs
- PropertyIDSet.cs
- XmlParserContext.cs
- Debug.cs
- IdentityHolder.cs
- EDesignUtil.cs