Esempio n. 1
0
        public string ToString(string format, IFormatProvider formatProvider)
        {
            ContractsCommon.ResultIsNonNull <string>();

            if (format == null)
            {
                format = _defaultFormat;
            }
            if (format.StartsWith("T", StringComparison.InvariantCultureIgnoreCase))
            {
                return(DateTime.ToString(format.Substring(1), formatProvider));
            }

            return(SecondsSinceEpoch.ToString(format, formatProvider));
        }
Esempio n. 2
0
 public override int GetHashCode()
 {
     return(SecondsSinceEpoch.GetHashCode());
 }
Esempio n. 3
0
 public bool Equals(Timestamp other)
 {
     return(SecondsSinceEpoch.Equals(other.SecondsSinceEpoch));
 }
Esempio n. 4
0
 public int CompareTo(Timestamp other)
 {
     return(SecondsSinceEpoch.CompareTo(other.SecondsSinceEpoch));
 }