Ejemplo n.º 1
0
 public void SaveGuide(int groupId)
 {
     if (!AlreadyGuide.Contains(groupId))
     {
         AlreadyGuide.Add(groupId);
     }
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }