MatchAttribute.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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, Inherited = true)]
  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. group = 1;
  26. }
  27. #endregion // Constructors
  28. #region Properties
  29. public int Capture {
  30. get { return capture; }
  31. set { capture = value; }
  32. }
  33. public int Group {
  34. get { return group; }
  35. set { group = value; }
  36. }
  37. public bool IgnoreCase {
  38. get { return ignoreCase; }
  39. set { ignoreCase = value; }
  40. }
  41. public int MaxRepeats {
  42. get { return maxRepeats; }
  43. set { maxRepeats = value; }
  44. }
  45. public string Pattern {
  46. get { return pattern; }
  47. set { pattern = value; }
  48. }
  49. #endregion // Properties
  50. }
  51. }