StatusInfoAttribute.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace SuperSocket.SocketBase.Metadata
  6. {
  7. /// <summary>
  8. /// StatusInfo Metadata
  9. /// </summary>
  10. #if !SILVERLIGHT
  11. [Serializable]
  12. #endif
  13. [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
  14. public class StatusInfoAttribute : Attribute
  15. {
  16. /// <summary>
  17. /// Initializes a new instance of the <see cref="StatusInfoAttribute" /> class.
  18. /// </summary>
  19. public StatusInfoAttribute()
  20. {
  21. OutputInPerfLog = true;
  22. }
  23. /// <summary>
  24. /// Initializes a new instance of the <see cref="StatusInfoAttribute" /> class.
  25. /// </summary>
  26. /// <param name="key">The key.</param>
  27. public StatusInfoAttribute(string key)
  28. : this()
  29. {
  30. Key = key;
  31. }
  32. /// <summary>
  33. /// Gets or sets the key.
  34. /// </summary>
  35. /// <value>
  36. /// The key.
  37. /// </value>
  38. public string Key { get; set; }
  39. /// <summary>
  40. /// Gets or sets the name.
  41. /// </summary>
  42. /// <value>
  43. /// The name.
  44. /// </value>
  45. public string Name { get; set; }
  46. /// <summary>
  47. /// Gets or sets the short name.
  48. /// </summary>
  49. /// <value>
  50. /// The short name.
  51. /// </value>
  52. public string ShortName { get; set; }
  53. /// <summary>
  54. /// Gets or sets the format.
  55. /// </summary>
  56. /// <value>
  57. /// The format.
  58. /// </value>
  59. public string Format { get; set; }
  60. /// <summary>
  61. /// Gets or sets the order.
  62. /// </summary>
  63. /// <value>
  64. /// The order.
  65. /// </value>
  66. public int Order { get; set; }
  67. /// <summary>
  68. /// Gets or sets a value indicating whether [output in perf log].
  69. /// </summary>
  70. /// <value>
  71. /// <c>true</c> if [output in perf log]; otherwise, <c>false</c>.
  72. /// </value>
  73. public bool OutputInPerfLog { get; set; }
  74. /// <summary>
  75. /// Gets or sets the type of the data.
  76. /// </summary>
  77. /// <value>
  78. /// The type of the data.
  79. /// </value>
  80. public Type DataType { get; set; }
  81. }
  82. }