public void Dispose() { if (action == null) { return; } var preserved = action; action = null; preserved(); } }