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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ICustomTypeDescriptor.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. /*
  16. */
  17. namespace System.ComponentModel
  18. {
  19.     using System.Runtime.Serialization.Formatters;
  20.     using System.Runtime.InteropServices;
  21.    
  22.    
  23.     using System.Diagnostics;
  24.    
  25.     using System;
  26.     using Microsoft.Win32;
  27.    
  28.    
  29.     /// <devdoc>
  30.     /// <para>Provides an interface that provides custom type information for an
  31.     /// object.</para>
  32.     /// </devdoc>
  33.     public interface ICustomTypeDescriptor
  34.     {
  35.        
  36.         /// <devdoc>
  37.         /// <para>Gets a collection of type <see cref='System.Attribute'/> with the attributes
  38.         /// for this object.</para>
  39.         /// </devdoc>
  40.         AttributeCollection GetAttributes();
  41.        
  42.         /// <devdoc>
  43.         /// <para>Gets the class name of this object.</para>
  44.         /// </devdoc>
  45.         string GetClassName();
  46.        
  47.         /// <devdoc>
  48.         /// <para>Gets the name of this object.</para>
  49.         /// </devdoc>
  50.         string GetComponentName();
  51.        
  52.         /// <devdoc>
  53.         /// <para>Gets a type converter for this object.</para>
  54.         /// </devdoc>
  55.         TypeConverter GetConverter();
  56.        
  57.         /// <devdoc>
  58.         /// <para>Gets the default event for this object.</para>
  59.         /// </devdoc>
  60.         EventDescriptor GetDefaultEvent();
  61.        
  62.        
  63.         /// <devdoc>
  64.         /// <para>Gets the default property for this object.</para>
  65.         /// </devdoc>
  66.         PropertyDescriptor GetDefaultProperty();
  67.        
  68.         /// <devdoc>
  69.         /// <para>Gets an editor of the specified type for this object.</para>
  70.         /// </devdoc>
  71.         object GetEditor(Type editorBaseType);
  72.        
  73.         /// <devdoc>
  74.         /// <para>Gets the events for this instance of a component.</para>
  75.         /// </devdoc>
  76.         EventDescriptorCollection GetEvents();
  77.        
  78.         /// <devdoc>
  79.         /// <para>Gets the events for this instance of a component using the attribute array as a
  80.         /// filter.</para>
  81.         /// </devdoc>
  82.         EventDescriptorCollection GetEvents(Attribute[] attributes);
  83.        
  84.         /// <devdoc>
  85.         /// <para>Gets the properties for this instance of a component.</para>
  86.         /// </devdoc>
  87.         PropertyDescriptorCollection GetProperties();
  88.        
  89.         /// <devdoc>
  90.         /// <para>Gets the properties for this instance of a component using the attribute array as a filter.</para>
  91.         /// </devdoc>
  92.         PropertyDescriptorCollection GetProperties(Attribute[] attributes);
  93.        
  94.         /// <devdoc>
  95.         /// <para>Gets the object that directly depends on this value being edited.</para>
  96.         /// </devdoc>
  97.         object GetPropertyOwner(PropertyDescriptor pd);
  98.     }
  99. }

Developer Fusion