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