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.
31 using System.Security.Permissions;
33 namespace System.Diagnostics
35 [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
36 public sealed class PerformanceCounterCategory
38 private string categoryName;
39 private string machineName;
41 public PerformanceCounterCategory ()
46 // may throw ArgumentException (""), ArgumentNullException
47 public PerformanceCounterCategory (string categoryName)
48 : this (categoryName, ".")
52 // may throw ArgumentException (""), ArgumentNullException
54 public PerformanceCounterCategory (string categoryName,
57 // TODO checks and whatever else is needed
58 this.categoryName = categoryName;
59 this.machineName = machineName;
60 throw new NotImplementedException ();
63 // may throw InvalidOperationException, Win32Exception
65 public string CategoryHelp {
66 get {throw new NotImplementedException ();}
69 // may throw ArgumentException (""), ArgumentNullException
71 public string CategoryName {
72 get {return categoryName;}
74 // TODO needs validity checks
79 // may throw ArgumentException
81 public string MachineName {
82 get {return machineName;}
84 // TODO needs validity checks
89 // may throw ArgumentNullException, InvalidOperationException
90 // (categoryName isn't set), Win32Exception
92 public bool CounterExists (string counterName)
94 throw new NotImplementedException ();
97 // may throw ArgumentNullException, InvalidOperationException
98 // (categoryName is ""), Win32Exception
100 public static bool CounterExists (string counterName,
103 throw new NotImplementedException ();
106 // may throw ArgumentNullException, InvalidOperationException
107 // (categoryName is "", machine name is bad), Win32Exception
109 public static bool CounterExists (string counterName,
113 throw new NotImplementedException ();
117 public static PerformanceCounterCategory Create (
120 CounterCreationDataCollection counterData)
122 throw new NotImplementedException ();
126 public static PerformanceCounterCategory Create (
132 throw new NotImplementedException ();
136 public static void Delete (string categoryName)
138 throw new NotImplementedException ();
142 public static bool Exists (string categoryName)
144 throw new NotImplementedException ();
148 public static bool Exists (string categoryName,
151 throw new NotImplementedException ();
155 public static PerformanceCounterCategory[] GetCategories ()
157 throw new NotImplementedException ();
161 public static PerformanceCounterCategory[] GetCategories (
164 throw new NotImplementedException ();
168 public PerformanceCounter[] GetCounters ()
170 throw new NotImplementedException ();
174 public PerformanceCounter[] GetCounters (string instanceName)
176 throw new NotImplementedException ();
180 public string[] GetInstanceNames ()
182 throw new NotImplementedException ();
186 public bool InstanceExists (string instanceName)
188 throw new NotImplementedException ();
192 public static bool InstanceExists (string instanceName,
195 throw new NotImplementedException ();
199 public static bool InstanceExists (string instanceName,
203 throw new NotImplementedException ();
207 public InstanceDataCollectionCollection ReadCategory ()
209 throw new NotImplementedException ();