The Labs \ Source Viewer \ SSCLI \ System.Reflection \ BindingFlags

  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. // BindingFlags are a set of flags that control the binding and invocation process
  19. // in Reflection. There are two processes. The first is selection of a Member which
  20. // is the binding phase. The second, is invocation. These flags control how this
  21. // process works.
  22. //
  23. // Date: June 99
  24. //
  25. namespace System.Reflection
  26. {
  27.    
  28.     using System;
  29.     [Flags(), Serializable()]
  30.     [System.Runtime.InteropServices.ComVisible(true)]
  31.     public enum BindingFlags
  32.     {
  33.        
  34.         // NOTES: We have lookup masks defined in RuntimeType and Activator. If we
  35.         // change the lookup values then these masks may need to change also.
  36.        
  37.         // a place holder for no flag specifed
  38.         Default = 0,
  39.        
  40.         // These flags indicate what to search for when binding
  41.         IgnoreCase = 1,
  42.         // Ignore the case of Names while searching
  43.         DeclaredOnly = 2,
  44.         // Only look at the members declared on the Type
  45.         Instance = 4,
  46.         // Include Instance members in search
  47.         Static = 8,
  48.         // Include Static members in search
  49.         Public = 16,
  50.         // Include Public members in search
  51.         NonPublic = 32,
  52.         // Include Non-Public members in search
  53.         FlattenHierarchy = 64,
  54.         // Rollup the statics into the class.
  55.         // These flags are used by InvokeMember to determine
  56.         // what type of member we are trying to Invoke.
  57.         // BindingAccess = 0xFF00;
  58.         InvokeMethod = 256,
  59.         CreateInstance = 512,
  60.         GetField = 1024,
  61.         SetField = 2048,
  62.         GetProperty = 4096,
  63.         SetProperty = 8192,
  64.        
  65.         // These flags are also used by InvokeMember but they should only
  66.         // be used when calling InvokeMember on a COM object.
  67.         PutDispProperty = 16384,
  68.         PutRefDispProperty = 32768,
  69.        
  70.         ExactBinding = 65536,
  71.         // Bind with Exact Type matching, No Change type
  72.         SuppressChangeType = 131072,
  73.        
  74.         // DefaultValueBinding will return the set of methods having ArgCount or
  75.         // more parameters. This is used for default values, etc.
  76.         OptionalParamBinding = 262144,
  77.        
  78.         // These are a couple of misc attributes used
  79.         IgnoreReturn = 16777216
  80.         // This is used in COM Interop
  81.     }
  82. }

Developer Fusion