public static bool CanFindPerformanceCounter(PerformanceCounterMetricName name) { var hasInstance = !string.IsNullOrEmpty(name.InstanceName); return hasInstance ? PerformanceCounterCategory.InstanceExists(name.InstanceName, name.CategoryName) : PerformanceCounterCategory.CounterExists(name.CounterName, name.CategoryName); }
public static bool CanFindPerformanceCounter(PerformanceCounterMetricName name) { var hasInstance = !string.IsNullOrEmpty(name.InstanceName); return(hasInstance ? PerformanceCounterCategory.InstanceExists(name.InstanceName, name.CategoryName) : PerformanceCounterCategory.CounterExists(name.CounterName, name.CategoryName)); }