System.Collections.Generic.IDictionary.ContainsKey(StreamProcessorId)

Here are the examples of the csharp api System.Collections.Generic.IDictionary.ContainsKey(StreamProcessorId) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 Source : in_memory_stream_processor_state_repository.cs
with MIT License
from dolittle

public Task<Try<IStreamProcessorState>> TryGetFor(IStreamProcessorId streamProcessorId, CancellationToken cancellationToken)
        {
            if (states.ContainsKey(streamProcessorId as StreamProcessorId)) return Task.FromResult(Try<IStreamProcessorState>.Succeeded(states[streamProcessorId as StreamProcessorId]));
            else return Task.FromResult(Try<IStreamProcessorState>.Failed(new Exception()));
        }