SqlUserDefinedAggregateAttribute.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. //
  2. // System.Data.Sql.SqlUserDefinedAggregateAttribute
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2003
  8. //
  9. #if NET_1_2
  10. using System;
  11. namespace System.Data.Sql {
  12. [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
  13. public sealed class SqlUserDefinedAggregateAttribute : Attribute
  14. {
  15. #region Fields
  16. public const int MaxByteSizeValue = 8000;
  17. Format format;
  18. bool isInvariantToDuplicates;
  19. bool isInvariantToNulls;
  20. bool isInvariantToOrder;
  21. bool isNullIfEmpty;
  22. int maxByteSize;
  23. #endregion // Fields
  24. #region Constructors
  25. public SqlUserDefinedAggregateAttribute (Format f)
  26. {
  27. Format = f;
  28. IsInvariantToDuplicates = false;
  29. IsInvariantToNulls = false;
  30. IsInvariantToOrder = false;
  31. IsNullIfEmpty = false;
  32. MaxByteSize = MaxByteSizeValue;
  33. }
  34. #endregion // Constructors
  35. #region Properties
  36. public Format Format {
  37. get { return format; }
  38. set { format = value; }
  39. }
  40. public bool IsInvariantToDuplicates {
  41. get { return isInvariantToDuplicates; }
  42. set { isInvariantToDuplicates = value; }
  43. }
  44. public bool IsInvariantToNulls {
  45. get { return isInvariantToNulls; }
  46. set { isInvariantToNulls = value; }
  47. }
  48. public bool IsInvariantToOrder {
  49. get { return isInvariantToOrder; }
  50. set { isInvariantToOrder = value; }
  51. }
  52. public bool IsNullIfEmpty {
  53. get { return isNullIfEmpty; }
  54. set { isNullIfEmpty = value; }
  55. }
  56. public int MaxByteSize {
  57. get { return maxByteSize; }
  58. set { maxByteSize = value; }
  59. }
  60. #endregion // Properties
  61. }
  62. }
  63. #endif