Exemplo n.º 1
0
        private bool IsPostRestricted(TwitterDataModel.Status status)
        {
            var _current = new PostInfo(string.Empty, string.Empty, string.Empty, string.Empty);

            _current.CreatedAt = status.CreatedAt;
            _current.Id = status.IdStr;
            if (status.Text == null)
            {
                _current.Text = string.Empty;
            }
            else
            {
                _current.Text = status.Text;
            }
            _current.UserId = status.User.IdStr;

            if (_current.Equals(_prev))
            {
                return true;
            }
            _prev.CreatedAt = _current.CreatedAt;
            _prev.Id = _current.Id;
            _prev.Text = _current.Text;
            _prev.UserId = _current.UserId;

            return false;
        }
Exemplo n.º 2
0
        private bool IsPostRestricted(Status status)
        {
            var currentPost = new PostInfo(status.CreatedAt, status.IdStr, status.Text ?? string.Empty, status.User.IdStr);

            if (currentPost.Equals(_prevPostInfo))
            {
                return true;
            }

            _prevPostInfo.CreatedAt = currentPost.CreatedAt;
            _prevPostInfo.Id = currentPost.Id;
            _prevPostInfo.Text = currentPost.Text;
            _prevPostInfo.UserId = currentPost.UserId;

            return false;
        }