2 // System.Web.Services.Description.MimeTextMatch.cs
\r
5 // Tim Coleman (tim@timcoleman.com)
\r
7 // Copyright (C) Tim Coleman, 2002
\r
10 using System.ComponentModel;
\r
11 using System.Xml.Serialization;
\r
13 namespace System.Web.Services.Description {
\r
14 public sealed class MimeTextMatch {
\r
21 MimeTextMatchCollection matches;
\r
27 #endregion // Fields
\r
29 #region Constructors
\r
31 public MimeTextMatch ()
\r
37 name = String.Empty;
\r
38 pattern = String.Empty;
\r
40 type = String.Empty;
\r
43 #endregion // Constructors
\r
48 [XmlAttribute ("capture")]
\r
49 public int Capture {
\r
50 get { return capture; }
\r
53 throw new ArgumentException ();
\r
59 [XmlAttribute ("group")]
\r
61 get { return group; }
\r
64 throw new ArgumentException ();
\r
69 [XmlAttribute ("ignoreCase")]
\r
70 public bool IgnoreCase {
\r
71 get { return ignoreCase; }
\r
72 set { ignoreCase = value; }
\r
75 [XmlElement ("match")]
\r
76 public MimeTextMatchCollection Matches {
\r
77 get { return matches; }
\r
80 [XmlAttribute ("name")]
\r
81 public string Name {
\r
82 get { return name; }
\r
83 set { name = value; }
\r
86 [XmlAttribute ("pattern")]
\r
87 public string Pattern {
\r
88 get { return pattern; }
\r
89 set { pattern = value; }
\r
93 public int Repeats {
\r
94 get { return repeats; }
\r
97 throw new ArgumentException ();
\r
102 [DefaultValue ("1")]
\r
103 [XmlAttribute ("repeats")]
\r
104 public string RepeatsString {
\r
105 get { return Repeats.ToString (); }
\r
106 set { Repeats = Int32.Parse (value); }
\r
109 [XmlAttribute ("type")]
\r
110 public string Type {
\r
111 get { return type; }
\r
112 set { type = value; }
\r
115 #endregion // Properties
\r
119 internal void SetParent (MimeTextMatchCollection matches)
\r
121 this.matches = matches;
\r
124 #endregion // Methods
\r