internal GamePlayer(BuddyClient client, AuthenticatedUser user, InternalModels.DataContract_GamePlayerInfo info) { if (client == null) { throw new ArgumentNullException("client"); } if (user == null) { throw new ArgumentNullException("user"); } if (info == null) { throw new ArgumentNullException("info"); } this.UserID = user.ID; this.ApplicationTag = info.ApplicationTag; this.BoardName = info.PlayerBoardName; this.CreatedOn = Convert.ToDateTime(info.PlayerDate, CultureInfo.InvariantCulture); this.Latitude = client.TryParseDouble(info.PlayerLatitude); this.Longitude = client.TryParseDouble(info.PlayerLongitude); this.Name = info.PlayerName; this.Rank = info.PlayerRank; }
internal GroupMessage(BuddyClient client, InternalModels.DataContract_GroupMessage msg, MessageGroup group) { this.DateSent = Convert.ToDateTime(msg.SentDateTime, CultureInfo.InvariantCulture); this.Group = group; this.Latitude = client.TryParseDouble(msg.Latitude); this.Longitude = client.TryParseDouble(msg.Longitude); this.FromUserID = Int32.Parse(msg.FromUserID); this.Text = msg.MessageText; }
internal MetadataItem(BuddyClient client, UserMetadata owner, AppMetadata ownerApp, string token, InternalModels.DataContract_SearchAppMetaData d, double originLatitude, double originLongitude) : this(client, owner, ownerApp, token, d.MetaKey, d.MetaValue, client.TryParseDouble(d.MetaLatitude), client.TryParseDouble(d.MetaLongitude), d.LastUpdateDate, null) { this.DistanceInKilometers = this.Client.TryParseDouble (d.DistanceInKilometers); this.DistanceInMeters = this.Client.TryParseDouble (d.DistanceInMeters); this.DistanceInMiles = this.Client.TryParseDouble (d.DistanceInMiles); this.DistanceInYards = this.Client.TryParseDouble (d.DistanceInYards); }
internal GameScore(BuddyClient client, InternalModels.DataContract_GameBoardScoreList score) { if (client == null) { throw new ArgumentNullException("client"); } if (score == null) { throw new ArgumentNullException("score"); } this.BoardName = score.ScoreBoardName; this.AddedOn = Convert.ToDateTime(score.ScoreDate, CultureInfo.InvariantCulture); this.Latitude = client.TryParseDouble(score.ScoreLatitude); this.Longitude = client.TryParseDouble(score.ScoreLongitude); this.Rank = score.ScoreRank; this.Score = Double.Parse(score.ScoreValue, CultureInfo.InvariantCulture); this.UserID = Int32.Parse(score.UserID); this.UserName = score.UserName; this.AppTag = score.ApplicationTag; }
internal PicturePublic(BuddyClient client, User user, InternalModels.DataContract_PublicPhotoSearch photo, int userId) : base(client) { if (photo == null) { throw new ArgumentNullException("photo"); } this.FullUrl = photo.FullPhotoURL; this.ThumbnailUrl = photo.ThumbnailPhotoURL; this.Latitude = this.Client.TryParseDouble(photo.Latitude); this.Longitude = this.Client.TryParseDouble(photo.Longitude); this.AddedOn = Convert.ToDateTime(photo.PhotoAdded, CultureInfo.InvariantCulture); this.AppTag = photo.ApplicationTag; this.PhotoID = Int32.Parse(photo.PhotoID); this.User = user; this.UserId = userId; this.DistanceInKilometers = client.TryParseDouble(photo.DistanceInKilometers); this.DistanceInMeters = client.TryParseDouble(photo.DistanceInMeters); this.DistanceInMiles = client.TryParseDouble(photo.DistanceInMiles); this.DistanceInYards = client.TryParseDouble(photo.DistanceInYards); }
internal Picture(BuddyClient client, AuthenticatedUser user, InternalModels.DataContract_PhotoList photo) : base(client, photo.FullPhotoURL, photo.ThumbnailPhotoURL, client.TryParseDouble(photo.Latitude), client.TryParseDouble(photo.Longitude), photo.PhotoComment, photo.ApplicationTag, photo.AddedDateTime, Int32.Parse(photo.PhotoID), user) { }