DesignOnlyAttribute.cs 705 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // System.ComponentModel.DesignOnlyAttribute.cs
  3. //
  4. // Author:
  5. // Miguel de Icaza ([email protected])
  6. //
  7. // (C) Ximian, Inc. http://www.ximian.com
  8. //
  9. //
  10. namespace System.ComponentModel {
  11. [AttributeUsage (AttributeTargets.Property)]
  12. public class DesignOnlyAttribute : Attribute {
  13. bool design_only;
  14. public static readonly DesignOnlyAttribute No;
  15. public static readonly DesignOnlyAttribute Yes;
  16. static DesignOnlyAttribute ()
  17. {
  18. No = new DesignOnlyAttribute (false);
  19. Yes = new DesignOnlyAttribute (false);
  20. }
  21. public DesignOnlyAttribute (bool design_only)
  22. {
  23. this.design_only = design_only;
  24. }
  25. public bool IsDesignOnly {
  26. get {
  27. return design_only;
  28. }
  29. }
  30. }
  31. }