private void Close() { Hub.Instance.ForegroundTask = null; Hub.Instance.ForegroundConnection = null; _deferral?.Complete(); } }