public Task <ReadModelHandler> GetReadModelHandlerByType(string typeName) { var value = _readModelHandlers.ContainsKey(typeName); if (!value) { return(Task.FromResult(default(ReadModelHandler))); } return(Task.FromResult(_readModelHandlers.First(kvp => kvp.Value.ReadmodelType == typeName).Value)); }