EditorBrowsableAttribute.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. namespace System.ComponentModel
  3. {
  4. /// <summary>
  5. /// Specifies that a property or method is viewable in an editor. This class cannot be inherited.
  6. /// </summary>
  7. [MonoTODO("Missing description for State. Only minimal testing.")]
  8. [AttributeUsage(
  9. AttributeTargets.Class|
  10. AttributeTargets.Constructor|
  11. AttributeTargets.Delegate|
  12. AttributeTargets.Enum|
  13. AttributeTargets.Event|
  14. AttributeTargets.Field|
  15. AttributeTargets.Interface|
  16. AttributeTargets.Method|
  17. AttributeTargets.Property|
  18. AttributeTargets.Struct)]
  19. public sealed class EditorBrowsableAttribute : Attribute
  20. {
  21. private System.ComponentModel.EditorBrowsableState state;
  22. /// <summary>
  23. /// FIXME: Summary description for State.
  24. /// </summary>
  25. public System.ComponentModel.EditorBrowsableState State
  26. {
  27. get
  28. {
  29. return state;
  30. }
  31. }
  32. /// <summary>
  33. /// Initializes a new instance of the System.ComponentModel.EditorBrowsableAttribute class with an System.ComponentModel.EditorBrowsableState.
  34. /// </summary>
  35. /// <param name="state">The System.ComponentModel.EditorBrowsableState to set System.ComponentModel.EditorBrowsableAttribute.State to.</param>
  36. public EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState state)
  37. {
  38. this.state = state;
  39. }
  40. /// <summary>
  41. /// Initializes a new instance of the System.ComponentModel.EditorBrowsableAttribute class with an System.ComponentModel.EditorBrowsableState == System.ComponentModel.EditorBrowsableState.Always.
  42. /// </summary>
  43. public EditorBrowsableAttribute()
  44. {
  45. this.state = System.ComponentModel.EditorBrowsableState.Always;
  46. }
  47. }
  48. }