public static void ReadAllBytes(string path, Action<Exception, byte[]> callback) { if (callback == null) throw new ArgumentNullException("callback"); FileReadAllAsync(path, (ex, buffer) => EventLoop.Pend(() => callback(ex, buffer))); }