New test.
[mono.git] / mcs / class / System / System.Diagnostics / PerformanceCounterCategory.cs
1 //
2 // System.Diagnostics.PerformanceCounterCategory.cs
3 //
4 // Authors:
5 //   Jonathan Pryor (jonpryor@vt.edu)
6 //
7 // (C) 2002
8 //
9
10 //
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.
29 //
30
31 using System.Security.Permissions;
32
33 namespace System.Diagnostics 
34 {
35         [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
36         public sealed class PerformanceCounterCategory 
37         {
38                 private string categoryName;
39                 private string machineName;
40
41                 public PerformanceCounterCategory ()
42                         : this ("", ".")
43                 {
44                 }
45
46                 // may throw ArgumentException (""), ArgumentNullException
47                 public PerformanceCounterCategory (string categoryName)
48                         : this (categoryName, ".")
49                 {
50                 }
51
52                 // may throw ArgumentException (""), ArgumentNullException
53                 [MonoTODO]
54                 public PerformanceCounterCategory (string categoryName,
55                         string machineName)
56                 {
57                         // TODO checks and whatever else is needed
58                         this.categoryName = categoryName;
59                         this.machineName = machineName;
60                         throw new NotImplementedException ();
61                 }
62
63                 // may throw InvalidOperationException, Win32Exception
64                 [MonoTODO]
65                 public string CategoryHelp {
66                         get {throw new NotImplementedException ();}
67                 }
68
69                 // may throw ArgumentException (""), ArgumentNullException
70                 [MonoTODO]
71                 public string CategoryName {
72                         get {return categoryName;}
73                         set {
74                                 // TODO needs validity checks
75                                 categoryName = value;
76                         }
77                 }
78
79                 // may throw ArgumentException
80                 [MonoTODO]
81                 public string MachineName {
82                         get {return machineName;}
83                         set {
84                                 // TODO needs validity checks
85                                 machineName = value;
86                         }
87                 }
88
89                 // may throw ArgumentNullException, InvalidOperationException
90                 // (categoryName isn't set), Win32Exception
91                 [MonoTODO]
92                 public bool CounterExists (string counterName)
93                 {
94                         throw new NotImplementedException ();
95                 }
96
97                 // may throw ArgumentNullException, InvalidOperationException
98                 // (categoryName is ""), Win32Exception
99                 [MonoTODO]
100                 public static bool CounterExists (string counterName, 
101                         string categoryName)
102                 {
103                         throw new NotImplementedException ();
104                 }
105
106                 // may throw ArgumentNullException, InvalidOperationException
107                 // (categoryName is "", machine name is bad), Win32Exception
108                 [MonoTODO]
109                 public static bool CounterExists (string counterName, 
110                         string categoryName,
111                         string machineName)
112                 {
113                         throw new NotImplementedException ();
114                 }
115
116                 [MonoTODO]
117                 public static PerformanceCounterCategory Create (
118                         string categoryName,
119                         string categoryHelp,
120                         CounterCreationDataCollection counterData)
121                 {
122                         throw new NotImplementedException ();
123                 }
124
125                 [MonoTODO]
126                 public static PerformanceCounterCategory Create (
127                         string categoryName,
128                         string categoryHelp,
129                         string counterName,
130                         string counterHelp)
131                 {
132                         throw new NotImplementedException ();
133                 }
134
135                 [MonoTODO]
136                 public static void Delete (string categoryName)
137                 {
138                         throw new NotImplementedException ();
139                 }
140
141                 [MonoTODO]
142                 public static bool Exists (string categoryName)
143                 {
144                         throw new NotImplementedException ();
145                 }
146
147                 [MonoTODO]
148                 public static bool Exists (string categoryName, 
149                         string machineName)
150                 {
151                         throw new NotImplementedException ();
152                 }
153
154                 [MonoTODO]
155                 public static PerformanceCounterCategory[] GetCategories ()
156                 {
157                         throw new NotImplementedException ();
158                 }
159
160                 [MonoTODO]
161                 public static PerformanceCounterCategory[] GetCategories (
162                         string machineName)
163                 {
164                         throw new NotImplementedException ();
165                 }
166
167                 [MonoTODO]
168                 public PerformanceCounter[] GetCounters ()
169                 {
170                         throw new NotImplementedException ();
171                 }
172
173                 [MonoTODO]
174                 public PerformanceCounter[] GetCounters (string instanceName)
175                 {
176                         throw new NotImplementedException ();
177                 }
178
179                 [MonoTODO]
180                 public string[] GetInstanceNames ()
181                 {
182                         throw new NotImplementedException ();
183                 }
184
185                 [MonoTODO]
186                 public bool InstanceExists (string instanceName)
187                 {
188                         throw new NotImplementedException ();
189                 }
190
191                 [MonoTODO]
192                 public static bool InstanceExists (string instanceName, 
193                         string categoryName)
194                 {
195                         throw new NotImplementedException ();
196                 }
197
198                 [MonoTODO]
199                 public static bool InstanceExists (string instanceName, 
200                         string categoryName,
201                         string machineName)
202                 {
203                         throw new NotImplementedException ();
204                 }
205
206                 [MonoTODO]
207                 public InstanceDataCollectionCollection ReadCategory ()
208                 {
209                         throw new NotImplementedException ();
210                 }
211         }
212 }
213