MatchAttribute.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //
  2. // System.Web.Services.Protocols.MatchAttribute.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. namespace System.Web.Services.Protocols {
  10. [AttributeUsage (AttributeTargets.All)]
  11. public sealed class MatchAttribute : Attribute {
  12. #region Fields
  13. int capture;
  14. int group;
  15. bool ignoreCase;
  16. int maxRepeats;
  17. string pattern;
  18. #endregion
  19. #region Constructors
  20. public MatchAttribute (string pattern)
  21. {
  22. ignoreCase = false;
  23. maxRepeats = -1;
  24. this.pattern = pattern;
  25. }
  26. #endregion // Constructors
  27. #region Properties
  28. public int Capture {
  29. get { return capture; }
  30. set { capture = value; }
  31. }
  32. public int Group {
  33. get { return group; }
  34. set { group = value; }
  35. }
  36. public bool IgnoreCase {
  37. get { return ignoreCase; }
  38. set { ignoreCase = value; }
  39. }
  40. public int MaxRepeats {
  41. get { return maxRepeats; }
  42. set { maxRepeats = value; }
  43. }
  44. public string Pattern {
  45. get { return pattern; }
  46. set { pattern = value; }
  47. }
  48. #endregion // Properties
  49. }
  50. }