private static CounterCreationData[] CreationDataFor(PerformanceCounterSpec[] performanceCounterSpecs)
 {
     var creationData = new CounterCreationData[performanceCounterSpecs.Length];
     for (var i = 0; i < performanceCounterSpecs.Length; i++)
     {
         creationData[i] = performanceCounterSpecs[i].CounterCreationData();
     }
     return creationData;
 }
        public static void Install()
        {
            if (CategoryExists())
            {
                return;
            }

            CounterCreationData[]         creationData = CreationDataFor(PerformanceCounterSpec.All());
            CounterCreationDataCollection collection   = new CounterCreationDataCollection(creationData);

            PerformanceCounterCategory.Create(CategoryName, "Db4o Performance Counters", PerformanceCounterCategoryType.MultiInstance, collection);
        }
 public static PerformanceCounter CounterFor(PerformanceCounterSpec spec, IObjectContainer container)
 {
     return(NewDb4oCounter(spec.Id, container.ToString(), true));
 }
 internal static PerformanceCounter CounterFor(PerformanceCounterSpec spec, IObjectContainer container, bool readOnly)
 {
     return(NewDb4oCounter(spec.Id, container.ToString(), readOnly));
 }
 public static PerformanceCounter CounterFor(PerformanceCounterSpec spec, bool readOnly)
 {
     return(CounterFor(spec, My <IObjectContainer> .Instance, readOnly));
 }
 public static PerformanceCounter CounterFor(PerformanceCounterSpec spec, IObjectContainer container)
 {
     return NewDb4oCounter(spec.Id, container.ToString(), true);
 }
 internal static PerformanceCounter CounterFor(PerformanceCounterSpec spec, IObjectContainer container,
     bool readOnly)
 {
     return NewDb4oCounter(spec.Id, container.ToString(), readOnly);
 }
 public static PerformanceCounter CounterFor(PerformanceCounterSpec spec, bool readOnly)
 {
     return CounterFor(spec, My<IObjectContainer>.Instance, readOnly);
 }