BindingFlags.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. namespace System.Reflection
  5. {
  6. [Flags]
  7. public enum BindingFlags
  8. {
  9. // NOTES: We have lookup masks defined in RuntimeType and Activator. If we
  10. // change the lookup values then these masks may need to change also.
  11. // a place holder for no flag specifed
  12. Default = 0x00,
  13. // These flags indicate what to search for when binding
  14. IgnoreCase = 0x01, // Ignore the case of Names while searching
  15. DeclaredOnly = 0x02, // Only look at the members declared on the Type
  16. Instance = 0x04, // Include Instance members in search
  17. Static = 0x08, // Include Static members in search
  18. Public = 0x10, // Include Public members in search
  19. NonPublic = 0x20, // Include Non-Public members in search
  20. FlattenHierarchy = 0x40, // Rollup the statics into the class.
  21. // These flags are used by InvokeMember to determine
  22. // what type of member we are trying to Invoke.
  23. // BindingAccess = 0xFF00;
  24. InvokeMethod = 0x0100,
  25. CreateInstance = 0x0200,
  26. GetField = 0x0400,
  27. SetField = 0x0800,
  28. GetProperty = 0x1000,
  29. SetProperty = 0x2000,
  30. // These flags are also used by InvokeMember but they should only
  31. // be used when calling InvokeMember on a COM object.
  32. PutDispProperty = 0x4000,
  33. PutRefDispProperty = 0x8000,
  34. ExactBinding = 0x010000, // Bind with Exact Type matching, No Change type
  35. SuppressChangeType = 0x020000,
  36. // DefaultValueBinding will return the set of methods having ArgCount or
  37. // more parameters. This is used for default values, etc.
  38. OptionalParamBinding = 0x040000,
  39. // These are a couple of misc attributes used
  40. IgnoreReturn = 0x01000000, // This is used in COM Interop
  41. DoNotWrapExceptions = 0x02000000, // Disables wrapping exceptions in TargetInvocationException
  42. }
  43. }