private void _work(ref KeyValuePair <string, Worker> pair) { var owner = pair.Key; var worker = pair.Value; switch (worker.state) { case 0: // init _loader.Load(owner); break; case 1: // load complete _reader.Read(owner); break; } }