internal static void DecrementStateServiceCounter(StateServicePerfCounter counter) { if (_stateService == IntPtr.Zero) { return; } UnsafeNativeMethods.PerfDecrementCounter(_stateService, (int)counter); switch (counter) { case StateServicePerfCounter.STATE_SERVICE_SESSIONS_TOTAL: DecrementGlobalCounter(GlobalPerfCounter.STATE_SERVER_SESSIONS_TOTAL); break; case StateServicePerfCounter.STATE_SERVICE_SESSIONS_ACTIVE: DecrementGlobalCounter(GlobalPerfCounter.STATE_SERVER_SESSIONS_ACTIVE); break; case StateServicePerfCounter.STATE_SERVICE_SESSIONS_TIMED_OUT: DecrementGlobalCounter(GlobalPerfCounter.STATE_SERVER_SESSIONS_TIMED_OUT); break; case StateServicePerfCounter.STATE_SERVICE_SESSIONS_ABANDONED: DecrementGlobalCounter(GlobalPerfCounter.STATE_SERVER_SESSIONS_ABANDONED); break; default: break; } }
internal static void DecrementGlobalCounter(GlobalPerfCounter counter) { if (_global != IntPtr.Zero) { UnsafeNativeMethods.PerfDecrementCounter(_global, (int)counter); } }
internal static void DecrementCounter(AppPerfCounter counter) { if (_instance != null) { UnsafeNativeMethods.PerfDecrementCounter(_instance.UnsafeHandle, (int)counter); } }
internal /*public*/ static void DecrementGlobalCounter(GlobalPerfCounter counter) { if (GoingIn()) { try { UnsafeNativeMethods.PerfDecrementCounter(_global, (int)counter); } finally { GoingOut(); } } }
internal /*public*/ static void DecrementCounter(AppPerfCounter counter) { if (GoingIn()) { try { UnsafeNativeMethods.PerfDecrementCounter(_instance, (int)counter); } finally { GoingOut(); } } }