SROptions.Attributes.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System;
  2. public partial class SROptions
  3. {
  4. // For compatibility with older versions of SRDebugger, this simply inherits from the component model version.
  5. [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)]
  6. public sealed class DisplayNameAttribute : System.ComponentModel.DisplayNameAttribute
  7. {
  8. public DisplayNameAttribute(string displayName) : base(displayName)
  9. {
  10. }
  11. }
  12. // These attributes are used when using SROptions. Options added via SRDebug.Instance.AddOptionsContainer can use the attribute defined in SRDebugger namespace.
  13. [AttributeUsage(AttributeTargets.Property)]
  14. public sealed class IncrementAttribute :
  15. #if DISABLE_SRDEBUGGER
  16. Attribute
  17. #else
  18. SRDebugger.IncrementAttribute
  19. #endif
  20. {
  21. public IncrementAttribute(double increment)
  22. #if !DISABLE_SRDEBUGGER
  23. : base(increment)
  24. #endif
  25. {
  26. }
  27. }
  28. [AttributeUsage(AttributeTargets.Property)]
  29. public sealed class NumberRangeAttribute :
  30. #if DISABLE_SRDEBUGGER
  31. Attribute
  32. #else
  33. SRDebugger.NumberRangeAttribute
  34. #endif
  35. {
  36. public NumberRangeAttribute(double min, double max)
  37. #if !DISABLE_SRDEBUGGER
  38. : base(min, max)
  39. #endif
  40. {
  41. }
  42. }
  43. [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)]
  44. public sealed class SortAttribute :
  45. #if DISABLE_SRDEBUGGER
  46. Attribute
  47. #else
  48. SRDebugger.SortAttribute
  49. #endif
  50. {
  51. public SortAttribute(int priority)
  52. #if !DISABLE_SRDEBUGGER
  53. : base(priority)
  54. #endif
  55. {
  56. }
  57. }
  58. }