示例#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));
        }
示例#2
0
 public override int GetHashCode()
 {
     return(SecondsSinceEpoch.GetHashCode());
 }
示例#3
0
 public bool Equals(Timestamp other)
 {
     return(SecondsSinceEpoch.Equals(other.SecondsSinceEpoch));
 }
示例#4
0
 public int CompareTo(Timestamp other)
 {
     return(SecondsSinceEpoch.CompareTo(other.SecondsSinceEpoch));
 }