蛙蛙求助:请教.net 2.0里的PerformanceCounterCategoryType枚举问题。
蛙蛙求助:请教.net 2.0里的PerformanceCounterCategoryType枚举问题。
public string PerformanceObjectName = "MyEnterpriseApplication";
// create a collection...
CounterCreationDataCollection list = new CounterCreationDataCollection();
// go through each counter...
foreach(EnterpriseCounter counter in Counters)
{
// create some new data...
CounterCreationData data = new CounterCreationData();
data.CounterName = counter.Name;
data.CounterHelp = counter.HelpText;
data.CounterType = counter.Type;
// add it...
list.Add(data);
}
// create the category and all of the counters...
//PerformanceCounterCategory.Create(PerformanceObjectName, "", list);
PerformanceCounterCategory.Create(PerformanceObjectName,
"",
PerformanceCounterCategoryType.MultiInstance,
list);
就最后这句里的PerformanceCounterCategoryType.SingleInstance,MultiInstance,Unknown枚举的各个选项都是指什么呀。。