public void SaveGuide(int groupId) { if (!AlreadyGuide.Contains(groupId)) { AlreadyGuide.Add(groupId); } }
public void RemoveFriend(Address target, Address friend) { Runtime.Expect(IsWitness(target), "invalid witness"); Runtime.Expect(friend != Address.Null, "friend address must not be null"); Runtime.Expect(friend != target, "friend must be different from target address"); Runtime.Expect(_friends.Contains(friend), "friend not found"); _friends.Remove(friend); Runtime.Notify(EventKind.AddressRemove, target, friend); }
internal void AddToPlaylistTracks(PlaylistTrack playlistTrack) { #if DEBUG if (playlistTrack == PlaylistTrack.NoPlaylistTrack) { throw new Exception(); } if ((playlistTrack.Key >= 0) && (Key < 0)) { throw new Exception(); } if (playlistTracks.Contains(playlistTrack)) { throw new Exception(); } #endif playlistTracks.Add(playlistTrack); onAddedToPlaylistTracks(playlistTrack); }
internal void AddToTracks(Track track) { #if DEBUG if (track == Track.NoTrack) { throw new Exception(); } if ((track.Key >= 0) && (Key < 0)) { throw new Exception(); } if (tracks.Contains(track)) { throw new Exception(); } #endif tracks.Add(track); onAddedToTracks(track); }