public ICriteria SetTimeout(int timeout) { ICriteriaEvent criteriaEvent = new SetTimeoutEvent(timeout); foreach (IShard shard in shards) { if (shard.GetCriteriaById(criteriaId) != null) { shard.GetCriteriaById(criteriaId).SetTimeout(timeout); } else { shard.AddCriteriaEvent(criteriaId, criteriaEvent); } } return(this); }
public ICriteria SetTimeout(int timeout) { ICriteriaEvent criteriaEvent = new SetTimeoutEvent(timeout); foreach (IShard shard in shards) { if (shardToCriteriaMap[shard] != null) { shardToCriteriaMap[shard].SetTimeout(timeout); } else { shardToEventListMap[shard].Add(criteriaEvent); } } return(this); }