DecimalPrecisionAttribute.cs 549 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace ShwasherSys
  7. {
  8. [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
  9. public class DecimalPrecisionAttribute : Attribute
  10. {
  11. public DecimalPrecisionAttribute(byte precision = 18, byte scale = 3)
  12. {
  13. Precision = precision;
  14. Scale = scale;
  15. }
  16. public byte Precision { get; set; }
  17. public byte Scale { get; set; }
  18. }
  19. }