示例#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);
        }
        // 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();
                }
            }
        }