Ejemplo n.º 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;
		}
Ejemplo n.º 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;
		}
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }