2 // System.Diagnostics.PerformanceCounterCategory.cs
5 // Jonathan Pryor (jonpryor@vt.edu)
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:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
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.
32 using System.Diagnostics;
34 namespace System.Diagnostics
37 public sealed class PerformanceCounterCategory
39 private string categoryName;
40 private string machineName;
42 public PerformanceCounterCategory ()
47 // may throw ArgumentException (""), ArgumentNullException
48 public PerformanceCounterCategory (string categoryName)
49 : this (categoryName, ".")
53 // may throw ArgumentException (""), ArgumentNullException
55 public PerformanceCounterCategory (string categoryName,
58 // TODO checks and whatever else is needed
59 this.categoryName = categoryName;
60 this.machineName = machineName;
61 throw new NotImplementedException ();
64 // may throw InvalidOperationException, Win32Exception
66 public string CategoryHelp {
67 get {throw new NotImplementedException ();}
70 // may throw ArgumentException (""), ArgumentNullException
72 public string CategoryName {
73 get {return categoryName;}
75 // TODO needs validity checks
80 // may throw ArgumentException
82 public string MachineName {
83 get {return machineName;}
85 // TODO needs validity checks
90 // may throw ArgumentNullException, InvalidOperationException
91 // (categoryName isn't set), Win32Exception
93 public bool CounterExists (string counterName)
95 throw new NotImplementedException ();
98 // may throw ArgumentNullException, InvalidOperationException
99 // (categoryName is ""), Win32Exception
101 public static bool CounterExists (string counterName,
104 throw new NotImplementedException ();
107 // may throw ArgumentNullException, InvalidOperationException
108 // (categoryName is "", machine name is bad), Win32Exception
110 public static bool CounterExists (string counterName,
114 throw new NotImplementedException ();
118 public static PerformanceCounterCategory Create (
121 CounterCreationDataCollection counterData)
123 throw new NotImplementedException ();
127 public static PerformanceCounterCategory Create (
133 throw new NotImplementedException ();
137 public static void Delete (string categoryName)
139 throw new NotImplementedException ();
143 public static bool Exists (string categoryName)
145 throw new NotImplementedException ();
149 public static bool Exists (string categoryName,
152 throw new NotImplementedException ();
156 public static PerformanceCounterCategory[] GetCategories ()
158 throw new NotImplementedException ();
162 public static PerformanceCounterCategory[] GetCategories (
165 throw new NotImplementedException ();
169 public PerformanceCounter[] GetCounters ()
171 throw new NotImplementedException ();
175 public PerformanceCounter[] GetCounters (string instanceName)
177 throw new NotImplementedException ();
181 public string[] GetInstanceNames ()
183 throw new NotImplementedException ();
187 public bool InstanceExists (string instanceName)
189 throw new NotImplementedException ();
193 public static bool InstanceExists (string instanceName,
196 throw new NotImplementedException ();
200 public static bool InstanceExists (string instanceName,
204 throw new NotImplementedException ();
208 public InstanceDataCollectionCollection ReadCategory ()
210 throw new NotImplementedException ();