DataSysAttribute.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //------------------------------------------------------------------------------
  2. // <copyright file="DataSysAttribute.cs" company="Microsoft">
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. // </copyright>
  5. // <owner current="true" primary="true">Microsoft</owner>
  6. // <owner current="true" primary="false">Microsoft</owner>
  7. //------------------------------------------------------------------------------
  8. /*
  9. */
  10. namespace System.Data {
  11. using System;
  12. using System.ComponentModel;
  13. /// <devdoc>
  14. /// <para>
  15. /// DescriptionAttribute marks a property, event, or extender with a
  16. /// description. Visual designers can display this description when referencing
  17. /// the member.
  18. /// </para>
  19. /// </devdoc>
  20. [AttributeUsage(AttributeTargets.All)]
  21. [Obsolete("DataSysDescriptionAttribute has been deprecated. https://go.microsoft.com/fwlink/?linkid=14202", false) ]
  22. public class DataSysDescriptionAttribute : DescriptionAttribute {
  23. private bool replaced = false;
  24. /// <devdoc>
  25. /// Constructs a new sys description.
  26. /// </devdoc>
  27. [ Obsolete("DataSysDescriptionAttribute has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202", false) ]
  28. public DataSysDescriptionAttribute(string description) : base(description) {
  29. }
  30. /// <devdoc>
  31. /// Retrieves the description text.
  32. /// </devdoc>
  33. public override string Description {
  34. get {
  35. if (!replaced) {
  36. replaced = true;
  37. DescriptionValue = Res.GetString(base.Description);
  38. }
  39. return base.Description;
  40. }
  41. }
  42. }
  43. }