DynamicDataStringLengthAttribute.cs 464 B

12345678910111213141516171819
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Web.DynamicData.ModelProviders;
  6. namespace MonoTests.ModelProviders
  7. {
  8. [AttributeUsage (AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
  9. class DynamicDataStringLengthAttribute : Attribute
  10. {
  11. public int MaxLength { get; private set; }
  12. public DynamicDataStringLengthAttribute (int maxLength)
  13. {
  14. MaxLength = maxLength;
  15. }
  16. }
  17. }