The Labs \ Source Viewer \ SSCLI \ System.ComponentModel \ ExpandableObjectConverter

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ExpandableObjectConverter.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.ComponentModel
  16. {
  17.     using Microsoft.Win32;
  18.     using System.Collections;
  19.     using System.ComponentModel.Design;
  20.     using System.Diagnostics;
  21.     using System.Security.Permissions;
  22.    
  23.     /// <devdoc>
  24.     /// <para>Provides
  25.     /// a type converter to convert expandable objects to and from various
  26.     /// other representations.</para>
  27.     /// </devdoc>
  28.     [HostProtection(SharedState = true)]
  29.     public class ExpandableObjectConverter : TypeConverter
  30.     {
  31.        
  32.         /// <devdoc>
  33.         /// <para>
  34.         /// Initializes a new instance of the System.ComponentModel.ExpandableObjectConverter class.
  35.         /// </para>
  36.         /// </devdoc>
  37.         public ExpandableObjectConverter()
  38.         {
  39.         }
  40.        
  41.        
  42.         /// <internalonly/>
  43.         /// <devdoc>
  44.         /// <para>Gets a collection of properties for the type of object
  45.         /// specified by the value
  46.         /// parameter.</para>
  47.         /// </devdoc>
  48.         public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
  49.         {
  50.             return TypeDescriptor.GetProperties(value, attributes);
  51.         }
  52.        
  53.         /// <internalonly/>
  54.         /// <devdoc>
  55.         /// <para>Gets a value indicating
  56.         /// whether this object supports properties using the
  57.         /// specified context.</para>
  58.         /// </devdoc>
  59.         public override bool GetPropertiesSupported(ITypeDescriptorContext context)
  60.         {
  61.             return true;
  62.         }
  63.     }
  64. }

Developer Fusion