public JsonValue ToJson(JsonSerializer serializer) { var json = new JsonObject(); Id.Serialize(json, serializer, "id"); Name.Serialize(json, serializer, "name"); Desc.Serialize(json, serializer, "desc"); Closed.Serialize(json, serializer, "closed"); Pinned.Serialize(json, serializer, "pinned"); Starred.Serialize(json, serializer, "starred"); Subscribed.Serialize(json, serializer, "subscribed"); Organization.SerializeId(json, "idOrganization"); BoardSource.SerializeId(json, "idBoardSource"); // Don't serialize the Preferences collection because Trello wants individual properties. if (Prefs != null) { Prefs.PermissionLevel.Serialize(json, serializer, "prefs/permissionLevel"); Prefs.SelfJoin.Serialize(json, serializer, "prefs/selfJoin"); Prefs.CardCovers.Serialize(json, serializer, "prefs/cardCovers"); Prefs.Invitations.Serialize(json, serializer, "prefs/invitations"); Prefs.Voting.Serialize(json, serializer, "prefs/voting"); Prefs.Comments.Serialize(json, serializer, "prefs/comments"); Prefs.CardAging.Serialize(json, serializer, "prefs/cardAging"); Prefs.CalendarFeed.Serialize(json, serializer, "prefs/calendarFeedEnabled "); Prefs.Background.Serialize(json, serializer, "prefs/background"); } return(json); }
private void Record_Load(object sender, EventArgs e) { if (PropertiesS.IndexOf("UNREAD") == -1) { BackColor = Color.White; panel1.Width = 0; } if (PropertiesS.IndexOf("STARRED") == -1) { Starred.Hide(); } if (PropertiesS.IndexOf("IMPORTANT") == -1) { Important.Hide(); } if (FileName == null || FileName == string.Empty) { Attachment.Hide(); } SenderName.Text = UserName; SenderAvt.Image = Avatar; Subject.Text = MsgSubject; TimeRecived.Text = RecivedTime; }
private bool Equals(RocketMessage other) { return(string.Equals(Id, other.Id) && string.Equals(RoomId, other.RoomId) && string.Equals(Message, other.Message) && IsBot == other.IsBot && Equals(CreatedBy, other.CreatedBy) && CreatedOn.Equals(other.CreatedOn) && Equals(EditedBy, other.EditedBy) && EditedOn.Equals(other.EditedOn) && IsBotMentioned == other.IsBotMentioned && IsFromMyself == other.IsFromMyself && string.Equals(Type, other.Type) && Mentions.Equals(other.Mentions) && Starred.Equals(other.Starred)); }
public async Task <IActionResult> Post(int id) { Starred newStarred = new Starred { Mini = await _context.Mini.FindAsync(id), User = await _userManager.GetUserAsync(User) }; await _context.Starred.AddAsync(newStarred); await _context.SaveChangesAsync(); return(Ok("{}")); }
public override int GetHashCode() { var hash = 13; var hashFactor = 7; hash = Id.GetHashCode(hash, hashFactor); hash = Artist.GetHashCode(hash, hashFactor); hash = Genre.GetHashCode(hash, hashFactor); hash = hash * hashFactor + Year.GetHashCode(); hash = hash * hashFactor + Rating.GetHashCode(); hash = hash * hashFactor + Starred.GetHashCode(); hash = hash * hashFactor + AlbumArtSize.GetHashCode(); hash = CoverArt.GetHashCode(hash, hashFactor); hash = hash * hashFactor + Child.GetHashCode(); return(hash); }
public async Task <IActionResult> Delete(int id) { IdentityUser CurrentUser = await _userManager.GetUserAsync(User); Starred Starred = await _context.Starred.FindAsync(id, CurrentUser.Id); if (Starred != null) { _context.Starred.Remove(Starred); await _context.SaveChangesAsync(); return(Ok("{}")); } else { return(NotFound()); } }
public override int GetHashCode() { unchecked { var hashCode = Id?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (RoomId?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Message?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ IsBot.GetHashCode(); hashCode = (hashCode * 397) ^ (CreatedBy?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ CreatedOn.GetHashCode(); hashCode = (hashCode * 397) ^ (EditedBy?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ EditedOn.GetHashCode(); hashCode = (hashCode * 397) ^ IsBotMentioned.GetHashCode(); hashCode = (hashCode * 397) ^ IsFromMyself.GetHashCode(); hashCode = (hashCode * 397) ^ (Type?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ Mentions.GetHashCode(); hashCode = (hashCode * 397) ^ Starred.GetHashCode(); return(hashCode); } }
public IActionResult Projects() { var followers = Starred.GetStarredRepos(); return(View(followers)); }
public string Export() { string[] strOut = { Id.ToString(), Character, CharacterOld, PinYinAscii, PinYin, Translation, HSKLevel.ToString(), Score.ToString(), Starred.ToString(), WritingScore.ToString(), WritingStarred.ToString() }; return(string.Join("\t", strOut)); }
public void CheckingForStarred() { Starred s = new Starred(); Assert.IsTrue(s.SetStarred()); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Athlete != null) { hashCode = hashCode * 59 + Athlete.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (Distance != null) { hashCode = hashCode * 59 + Distance.GetHashCode(); } if (ElevationGain != null) { hashCode = hashCode * 59 + ElevationGain.GetHashCode(); } if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (IdStr != null) { hashCode = hashCode * 59 + IdStr.GetHashCode(); } if (Map != null) { hashCode = hashCode * 59 + Map.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (_Private != null) { hashCode = hashCode * 59 + _Private.GetHashCode(); } if (Starred != null) { hashCode = hashCode * 59 + Starred.GetHashCode(); } if (Timestamp != null) { hashCode = hashCode * 59 + Timestamp.GetHashCode(); } if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (SubType != null) { hashCode = hashCode * 59 + SubType.GetHashCode(); } if (CreatedAt != null) { hashCode = hashCode * 59 + CreatedAt.GetHashCode(); } if (UpdatedAt != null) { hashCode = hashCode * 59 + UpdatedAt.GetHashCode(); } if (EstimatedMovingTime != null) { hashCode = hashCode * 59 + EstimatedMovingTime.GetHashCode(); } if (Segments != null) { hashCode = hashCode * 59 + Segments.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if Route instances are equal /// </summary> /// <param name="other">Instance of Route to be compared</param> /// <returns>Boolean</returns> public bool Equals(Route other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Athlete == other.Athlete || Athlete != null && Athlete.Equals(other.Athlete) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( Distance == other.Distance || Distance != null && Distance.Equals(other.Distance) ) && ( ElevationGain == other.ElevationGain || ElevationGain != null && ElevationGain.Equals(other.ElevationGain) ) && ( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( IdStr == other.IdStr || IdStr != null && IdStr.Equals(other.IdStr) ) && ( Map == other.Map || Map != null && Map.Equals(other.Map) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( _Private == other._Private || _Private != null && _Private.Equals(other._Private) ) && ( Starred == other.Starred || Starred != null && Starred.Equals(other.Starred) ) && ( Timestamp == other.Timestamp || Timestamp != null && Timestamp.Equals(other.Timestamp) ) && ( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( SubType == other.SubType || SubType != null && SubType.Equals(other.SubType) ) && ( CreatedAt == other.CreatedAt || CreatedAt != null && CreatedAt.Equals(other.CreatedAt) ) && ( UpdatedAt == other.UpdatedAt || UpdatedAt != null && UpdatedAt.Equals(other.UpdatedAt) ) && ( EstimatedMovingTime == other.EstimatedMovingTime || EstimatedMovingTime != null && EstimatedMovingTime.Equals(other.EstimatedMovingTime) ) && ( Segments == other.Segments || Segments != null && Segments.SequenceEqual(other.Segments) )); }
public IActionResult Projects() { var allStarredRepos = Starred.GetStarredRepos(); return(View(allStarredRepos)); }