// Will return true if it did delete and clear the reference, false if // it was already null. public static bool TryComplete(ref StatusToken token) { if (token != null) { token.Complete(); token = null; return(true); } return(false); }
// Will return true if it did delete and clear the reference, false if // it was already null. public static bool TryComplete(ref StatusToken token) { if (token != null) { token.Complete(); token = null; return true; } return false; }
private void StopLoading() { if (!_hasStoppedLoading) { _hasStoppedLoading = true; if (_loadingToken != null) { _loadingToken.Complete(); } } }