Пример #1
0
		public bool IsNewerThan (Versioned other)
		{
			// We are always newer than null.
			if (other == null)
				return true;

			// Anything with a valid timestamp always is
			// more recent than something w/o a timestamp.
			if (ValidTimestamp || other.ValidTimestamp) {
				if (other.ValidTimestamp)
					return IsNewerThan (other.Timestamp);
				else
					return true;
			}

			return false;
		}
Пример #2
0
		public bool IsObsoletedBy (Versioned other)
		{
			// We are never obsoleted by null.
			if (other == null)
				return false;

			// Anything with a valid timestamp always is
			// more recent than something w/o a timestamp.
			if (ValidTimestamp || other.ValidTimestamp) {
				if (other.ValidTimestamp)
					return IsObsoletedBy (other.Timestamp);
				else
					return false;
			}

			return false;
		}
Пример #3
0
        public bool IsNewerThan(Versioned other)
        {
            // We are always newer than null.
            if (other == null)
            {
                return(true);
            }

            // Anything with a valid timestamp always is
            // more recent than something w/o a timestamp.
            if (ValidTimestamp || other.ValidTimestamp)
            {
                if (other.ValidTimestamp)
                {
                    return(IsNewerThan(other.Timestamp));
                }
                else
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #4
0
        public bool IsObsoletedBy(Versioned other)
        {
            // We are never obsoleted by null.
            if (other == null)
            {
                return(false);
            }

            // Anything with a valid timestamp always is
            // more recent than something w/o a timestamp.
            if (ValidTimestamp || other.ValidTimestamp)
            {
                if (other.ValidTimestamp)
                {
                    return(IsObsoletedBy(other.Timestamp));
                }
                else
                {
                    return(false);
                }
            }

            return(false);
        }