Exemplo n.º 1
0
 public void UpdateRunner(int category, ISmartContractRunner runner)
 {
     if (_runners.ContainsKey(category))
     {
         _runners.AddOrUpdate(category, runner, (key, oldVal) => runner);
     }
 }
Exemplo n.º 2
0
 public void AddRunner(int category, ISmartContractRunner runner)
 {
     if (!_runners.TryAdd(category, runner))
     {
         throw new InvalidParameterException($"The runner for category {category} is already registered.");
     }
 }