(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Web / System.Web.UI / DataSourceSelectArguments.cs
blob34c5437c5cf45f6d6df81a1a887d0ef539007eaf
1 //
2 // System.Web.UI.DataSourceSelectArguments.cs
3 //
4 // Author:
5 // Sanjay Gupta <gsanjay@novell.com>
6 //
7 // (C) 2004 Novell, Inc (http://www.novell.com)
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 #if NET_2_0
32 using System;
34 namespace System.Web.UI
36 public sealed class DataSourceSelectArguments
38 string sortExpression = string.Empty;
39 int startingRowIndex = 0;
40 int maxRows = 0;
41 bool isEmpty;
42 bool getTotalRowCount = false;
43 int totalRowCount = -1;
44 DataSourceCapabilities dsc = DataSourceCapabilities.None;
46 public static readonly DataSourceSelectArguments Empty = new DataSourceSelectArguments ();
48 public DataSourceSelectArguments ()
50 this.isEmpty = true;
53 public DataSourceSelectArguments (string sortExpression)
55 this.sortExpression = sortExpression;
56 this.isEmpty = false;
59 public DataSourceSelectArguments (int startingRowIndex, int maxRows)
61 this.startingRowIndex = startingRowIndex;
62 this.maxRows = maxRows;
63 this.isEmpty = false;
66 public DataSourceSelectArguments (string sortExpression, int startingRowIndex, int maxRows)
68 this.sortExpression = sortExpression;
69 this.startingRowIndex = startingRowIndex;
70 this.maxRows = maxRows;
71 this.isEmpty = false;
74 public void AddSupportedCapabilities (DataSourceCapabilities srcCapabilities)
76 this.dsc = this.dsc | srcCapabilities;
79 [MonoTODO]
80 public override bool Equals (object obj)
82 if (!(obj is DataSourceSelectArguments))
83 return false;
84 return false;
87 [MonoTODO]
88 public override int GetHashCode ()
90 return sortExpression.GetHashCode ();
93 public void RaiseUnsupportedCapabilitiesError (DataSourceView view)
95 view.RaiseUnsupportedCapabilityError (this.dsc);
98 public bool IsEmpty {
99 get { return this.isEmpty; }
102 public int MaximumRows {
103 get { return this.MaximumRows; }
104 set {
105 this.maxRows = value;
106 this.isEmpty = false;
110 public bool RetrieveTotalRowCount {
111 get { return this.getTotalRowCount; }
112 set { this.getTotalRowCount = value; }
115 public string SortExpression {
116 get { return this.sortExpression; }
117 set {
118 this.sortExpression = value;
119 this.isEmpty = false;
123 public int StartRowIndex {
124 get { return this.startingRowIndex; }
125 set {
126 this.startingRowIndex = value;
127 this.isEmpty = false;
131 public int TotalRowCount {
132 get { return this.totalRowCount; }
133 set {
134 this.totalRowCount = value;
135 this.isEmpty = false;
140 #endif