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
- SequentialWorkflowRootDesigner.cs
- DataError.cs
- StaticResourceExtension.cs
- GeneratedContractType.cs
- CodeMemberEvent.cs
- MessageContractAttribute.cs
- AvTrace.cs
- Hashtable.cs
- SafeRightsManagementEnvironmentHandle.cs
- AssemblyName.cs
- StylusButtonEventArgs.cs
- AuthenticationException.cs
- RuleSettingsCollection.cs
- Tokenizer.cs
- SmtpLoginAuthenticationModule.cs
- StreamResourceInfo.cs
- Label.cs
- TableLayoutColumnStyleCollection.cs
- ExtendedTransformFactory.cs
- PipelineModuleStepContainer.cs
- SQLInt32Storage.cs
- InlineCollection.cs
- JsonObjectDataContract.cs
- WebServiceParameterData.cs
- ExceptionUtil.cs
- FontSourceCollection.cs
- TextRange.cs
- FastPropertyAccessor.cs
- XmlToDatasetMap.cs
- Timer.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- Helper.cs
- NotifyParentPropertyAttribute.cs
- CancelEventArgs.cs
- PassportAuthenticationModule.cs
- BCryptNative.cs
- CommandEventArgs.cs
- CodeDOMProvider.cs
- SequenceDesignerAccessibleObject.cs
- DataGridViewSelectedRowCollection.cs
- EngineSiteSapi.cs
- DataContractSerializerServiceBehavior.cs
- AbandonedMutexException.cs
- TimeoutException.cs
- PathFigure.cs
- MemberMemberBinding.cs
- XmlUtil.cs
- StringBuilder.cs
- DataGrid.cs
- ReadContentAsBinaryHelper.cs
- SHA256Managed.cs
- CustomAttributeSerializer.cs
- TextHidden.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- CallId.cs
- ProcessHost.cs
- XmlCodeExporter.cs
- FileInfo.cs
- SafeCoTaskMem.cs
- DeviceSpecific.cs
- PersonalizableTypeEntry.cs
- ContactManager.cs
- AutomationPeer.cs
- ProfileService.cs
- APCustomTypeDescriptor.cs
- CharacterHit.cs
- SqlDuplicator.cs
- Triplet.cs
- SmtpTransport.cs
- RemotingSurrogateSelector.cs
- BaseParaClient.cs
- NativeMethods.cs
- SerializerWriterEventHandlers.cs
- DrawingAttributesDefaultValueFactory.cs
- SqlPersistenceProviderFactory.cs
- SafeFindHandle.cs
- SID.cs
- CompositeFontParser.cs
- LabelDesigner.cs
- StackBuilderSink.cs
- TableLayoutSettingsTypeConverter.cs
- ToolStripPanelRow.cs
- CompositeActivityCodeGenerator.cs
- TextOnlyOutput.cs
- TypeDescriptor.cs
- PageWrapper.cs
- OneOfScalarConst.cs
- XmlAnyElementAttribute.cs
- MetadataSerializer.cs
- SqlConnection.cs
- VectorAnimation.cs
- BinaryEditor.cs
- Collection.cs
- GAC.cs
- RootBrowserWindowProxy.cs
- HttpListener.cs
- Trigger.cs
- Base64Encoder.cs
- BitmapInitialize.cs
- CacheModeConverter.cs