The Labs \ Source Viewer \ SSCLI \ System.Runtime.InteropServices.Expando \ IExpando

  1. // ==++==
  2. //
  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. //
  14. // ==--==
  15. ////////////////////////////////////////////////////////////////////////////////
  16. ////////////////////////////////////////////////////////////////////////////////
  17. //
  18. // IExpando is an interface which allows Objects implemeningt this interface
  19. // support the ability to modify the object by adding and removing members,
  20. // represented by MemberInfo objects.
  21. //
  22. // Date: March 98
  23. //
  24. // The IExpando Interface.
  25. namespace System.Runtime.InteropServices.Expando
  26. {
  27.    
  28.     using System;
  29.     using System.Reflection;
  30.    
  31.     [Guid("AFBF15E6-C37C-11d2-B88E-00A0C9B471B8")]
  32.     [System.Runtime.InteropServices.ComVisible(true)]
  33.     public interface IExpando : IReflect
  34.     {
  35.         // Add a new Field to the reflection object. The field has
  36.         // name as its name.
  37.         FieldInfo AddField(string name);
  38.        
  39.         // Add a new Property to the reflection object. The property has
  40.         // name as its name.
  41.         PropertyInfo AddProperty(string name);
  42.        
  43.         // Add a new Method to the reflection object. The method has
  44.         // name as its name and method is a delegate
  45.         // to the method.
  46.         MethodInfo AddMethod(string name, Delegate method);
  47.        
  48.         // Removes the specified member.
  49.         void RemoveMember(MemberInfo m);
  50.     }
  51. }

Developer Fusion