Here are the examples of the csharp api System.Collections.Concurrent.ConcurrentDictionary.ContainsKey(Executor) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : ExecutorFactory.cs
with MIT License
from zlzforever
with MIT License
from zlzforever
public IExecutor Create(Executor executor)
{
if (_cache.ContainsKey(executor))
{
return _cache[executor];
}
if (!Executors.ContainsKey(executor))
{
throw new SwarmClientException($"Unsupported executor: {executor}");
}
var executorInstance= (IExecutor) _serviceProvider.GetRequiredService(Executors[executor]);
_cache.TryAdd(executor, executorInstance);
return executorInstance;
}