Exemple #1
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>
 /// A 32-bit signed integer that is the hash code for this instance.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     unchecked
     {
         return((Price.GetHashCode() * 397) ^ Occured.GetHashCode());
     }
 }
Exemple #2
0
        public int Compare(VersionedObject <TObject> x, VersionedObject <TObject> y)
        {
            Occured occured = x.Version.Compare(y.Version);

            if (occured == Occured.Before)
            {
                return(-1);
            }
            else if (occured == Occured.After)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
Exemple #3
0
 /// <summary>
 /// Returns a string representation of this DataPoint instance using ISO8601 formatting for the date
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.String" /> containing a fully qualified type name.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public override string ToString()
 {
     return(string.Format("{0} - {1}", Occured.ToString("s"), Price));
 }