using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
-#if NET_2_0
using System.Runtime.ConstrainedExecution;
-#endif
namespace System.Diagnostics {
// must be safe for multithreaded operations
-#if !NET_2_0
- [Designer ("Microsoft.VisualStudio.Install.PerformanceCounterDesigner, " + Consts.AssemblyMicrosoft_VisualStudio)]
-#endif
[InstallerType (typeof (PerformanceCounterInstaller))]
public sealed class PerformanceCounter : Component, ISupportInitialize
{
bool valid_old;
bool changed;
bool is_custom;
-#if NET_2_0
private PerformanceCounterInstanceLifetime lifetime;
-#endif
-#if NET_2_0
[Obsolete]
-#endif
public static int DefaultFileMappingSize = 524288;
// set catname, countname, instname to "", machname to "."
}
}
-#if NET_2_0
[MonoTODO]
[DefaultValue (PerformanceCounterInstanceLifetime.Global)]
public PerformanceCounterInstanceLifetime InstanceLifetime {
get { return lifetime; }
set { lifetime = value; }
}
-#endif
[DefaultValue (""), ReadOnly (true), RecommendedAsConfigurable (true)]
[TypeConverter ("System.Diagnostics.Design.InstanceNameConverter, " + Consts.AssemblySystem_Design)]
}
// may throw InvalidOperationException, Win32Exception
-#if NET_2_0
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
-#endif
public long IncrementBy (long value)
{
if (changed)
// may throw InvalidOperationException, Win32Exception
[MonoTODO]
-#if NET_2_0
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
-#endif
public void RemoveInstance ()
{
throw new NotImplementedException ();