コード例 #1
0
ファイル: Program.cs プロジェクト: vsrz/desbot_vsrz
        static bool IsUserStale(User user)
        {
            //ignore tagged objects
            if (user.Tag == tag) return false;

            //ignore user with metadata
            if (user.CheckExistingMetaData() != null) return false;

            //ignore user with a last modification within last day
            //TODO: hardcoded as one day, consider making configurable
            if ((user.Left != DateTime.MinValue) && ((DateTime.UtcNow - user.LastChanged).TotalDays <= 1.0)) return false;

            //user data is stale
            return true;
        }