Exemple #1
0
 public static PCWrapper.CounterInstance GetInstance(string name)
 {
     if (!PCWrapper.isInitialised)
     {
         PCWrapper.Init();
     }
     if (PCWrapper.instances == null)
     {
         PCWrapper.instances = new Dictionary <string, PCWrapper.CounterInstance>();
     }
     PCWrapper.CounterInstance counterInstance = PCWrapper.instances.TryGetValue(name);
     if (counterInstance == null)
     {
         counterInstance = new PCWrapper.CounterInstance(name, PCWrapper.totalInstance);
         counterInstance.Init();
         PCWrapper.instances[name] = counterInstance;
     }
     return(counterInstance);
 }
Exemple #2
0
 public CounterInstance(string name, PCWrapper.CounterInstance ii) : this(name)
 {
     this.InnerInstance = ii;
 }