Beispiel #1
0
        public override int GetHashCode()
        {
            int hashCode = -1945719542;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Id);

            hashCode = hashCode * -1521134295 + EqualityComparer <InlineKeyboardMarkup> .Default.GetHashCode(ReplyMarkup);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ParseMode);

            hashCode = hashCode * -1521134295 + EqualityComparer <IEnumerable <MessageEntity> > .Default.GetHashCode(CaptionEntities);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Type);

            hashCode = hashCode * -1521134295 + Longitude.GetHashCode();
            hashCode = hashCode * -1521134295 + Latitude.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Title);

            hashCode = hashCode * -1521134295 + HorizontalAccuracy.GetHashCode();
            hashCode = hashCode * -1521134295 + LivePeriod.GetHashCode();
            hashCode = hashCode * -1521134295 + Heading.GetHashCode();
            hashCode = hashCode * -1521134295 + ProximityAlertRadius.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <InputMessageContent> .Default.GetHashCode(InputMessageContent);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ThumbUrl);

            hashCode = hashCode * -1521134295 + ThumbWidth.GetHashCode();
            hashCode = hashCode * -1521134295 + ThumbHeight.GetHashCode();
            return(hashCode);
        }
        public override int GetHashCode()
        {
            int hashCode = 1466495924;

            hashCode = hashCode * -1521134295 + Longitude.GetHashCode();
            hashCode = hashCode * -1521134295 + Latitude.GetHashCode();
            hashCode = hashCode * -1521134295 + HorizontalAccuracy.GetHashCode();
            hashCode = hashCode * -1521134295 + LivePeriod.GetHashCode();
            hashCode = hashCode * -1521134295 + Heading.GetHashCode();
            hashCode = hashCode * -1521134295 + ProximityAlertRadius.GetHashCode();
            return(hashCode);
        }
Beispiel #3
0
 /// <summary>
 /// Serializes the position record into a string suitable for logging or transmitting.
 /// </summary>
 /// <returns>The serialized record.</returns>
 public override string ToString()
 {
     return(string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}",
                          TimeUtc.HasValue ? Serialize.ToString(TimeUtc.Value) : string.Empty,
                          !double.IsNaN(Latitude) ? Latitude.ToString() : string.Empty,
                          !double.IsNaN(Longitude) ? Longitude.ToString() : string.Empty,
                          !double.IsNaN(Altitude) ? Altitude.ToString() : string.Empty,
                          !double.IsNaN(Course) ? Course.ToString() : string.Empty,
                          !double.IsNaN(Speed) ? Speed.ToString() : string.Empty,
                          !double.IsNaN(HorizontalAccuracy) ? HorizontalAccuracy.ToString() : string.Empty,
                          !double.IsNaN(VerticalAccurancy) ? VerticalAccurancy.ToString() : string.Empty,
                          Technology != GeoFixTechnology.Unknown ? Technology.ToString() : string.Empty,
                          NetworkStatus != NetworkStatus.Unknown ? NetworkStatus.ToString() : string.Empty));
 }
Beispiel #4
0
 /// <summary>
 /// Serializes the specified fields of the position record into a string suitable for logging or transmitting.
 /// </summary>
 /// <param name="fields">A <see cref="GeoFixField" /> bitmap describing the fields to be written.</param>
 /// <returns>The serialized record.</returns>
 public string ToString(GeoFixField fields)
 {
     return(string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}",
                          (fields & GeoFixField.TimeUtc) != 0 && TimeUtc.HasValue ? Serialize.ToString(TimeUtc.Value) : string.Empty,
                          (fields & GeoFixField.Latitude) != 0 && !double.IsNaN(Latitude) ? Latitude.ToString() : string.Empty,
                          (fields & GeoFixField.Longitude) != 0 && !double.IsNaN(Longitude) ? Longitude.ToString() : string.Empty,
                          (fields & GeoFixField.Altitude) != 0 && !double.IsNaN(Altitude) ? Altitude.ToString() : string.Empty,
                          (fields & GeoFixField.Course) != 0 && !double.IsNaN(Course) ? Course.ToString() : string.Empty,
                          (fields & GeoFixField.Speed) != 0 && !double.IsNaN(Speed) ? Speed.ToString() : string.Empty,
                          (fields & GeoFixField.HorizontalAccuracy) != 0 && !double.IsNaN(HorizontalAccuracy) ? HorizontalAccuracy.ToString() : string.Empty,
                          (fields & GeoFixField.VerticalAccurancy) != 0 && !double.IsNaN(VerticalAccurancy) ? VerticalAccurancy.ToString() : string.Empty,
                          (fields & GeoFixField.Technology) != 0 && Technology != GeoFixTechnology.Unknown ? Technology.ToString() : string.Empty,
                          (fields & GeoFixField.NetworkStatus) != 0 && NetworkStatus != NetworkStatus.Unknown ? NetworkStatus.ToString() : string.Empty));
 }