Пример #1
0
        // 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);
        }
Пример #2
0
        // 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;
        }
Пример #3
0
        private void StopLoading()
        {
            if (!_hasStoppedLoading)
            {
                _hasStoppedLoading = true;

                if (_loadingToken != null)
                {
                    _loadingToken.Complete();
                }
            }
        }