(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Web.Services / System.Web.Services.Description / MimeTextMatch.cs
blob83383ed964f1b53a32bcc78c5076c57cf9207a16
1 //
2 // System.Web.Services.Description.MimeTextMatch.cs
3 //
4 // Author:
5 // Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2002
8 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 //
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 //
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 using System.ComponentModel;
32 using System.Xml.Serialization;
34 namespace System.Web.Services.Description {
35 public sealed class MimeTextMatch {
37 #region Fields
39 int capture;
40 int group;
41 bool ignoreCase;
42 MimeTextMatchCollection matches;
43 string name;
44 string pattern;
45 int repeats;
46 string type;
48 #endregion // Fields
50 #region Constructors
52 public MimeTextMatch ()
54 capture = 0;
55 group = 1;
56 ignoreCase = false;
57 matches = null;
58 name = String.Empty;
59 pattern = String.Empty;
60 repeats = 1;
61 type = String.Empty;
64 #endregion // Constructors
66 #region Properties
68 [DefaultValue (0)]
69 [XmlAttribute ("capture")]
70 public int Capture {
71 get { return capture; }
72 set {
73 if (value < 0)
74 throw new ArgumentException ();
75 capture = value;
79 [DefaultValue (1)]
80 [XmlAttribute ("group")]
81 public int Group {
82 get { return group; }
83 set {
84 if (value < 0)
85 throw new ArgumentException ();
86 group = value;
90 [XmlAttribute ("ignoreCase")]
91 public bool IgnoreCase {
92 get { return ignoreCase; }
93 set { ignoreCase = value; }
96 [XmlElement ("match")]
97 public MimeTextMatchCollection Matches {
98 get { return matches; }
101 [XmlAttribute ("name")]
102 public string Name {
103 get { return name; }
104 set { name = value; }
107 [XmlAttribute ("pattern")]
108 public string Pattern {
109 get { return pattern; }
110 set { pattern = value; }
113 [XmlIgnore]
114 public int Repeats {
115 get { return repeats; }
116 set {
117 if (value < 0)
118 throw new ArgumentException ();
119 repeats = value;
123 [DefaultValue ("1")]
124 [XmlAttribute ("repeats")]
125 public string RepeatsString {
126 get { return Repeats.ToString (); }
127 set { Repeats = Int32.Parse (value); }
130 [XmlAttribute ("type")]
131 public string Type {
132 get { return type; }
133 set { type = value; }
136 #endregion // Properties
138 #region Methods
140 internal void SetParent (MimeTextMatchCollection matches)
142 this.matches = matches;
145 #endregion // Methods