示例#1
0
文件: Album.cs 项目: jpires/fooSpeech
 public void addMusic(Music music)
 {
     Contract.Requires(music != null);
     Contract.Ensures(this.MusicList.Count == Contract.OldValue(this.MusicList.Count) + 1);
     this.MusicList.Add(music);
 }
示例#2
0
 public void removeMusic(Music music)
 {
     Contract.Requires(music != null);
     Contract.Ensures(this.MusicList.Count == Contract.OldValue(this.MusicList.Count) - 1);
     this.MusicList.Remove(music);
 }
示例#3
0
文件: Album.cs 项目: jpires/fooSpeech
 public void removeMusic(Music music)
 {
     Contract.Requires(music != null);
     Contract.Ensures(this.MusicList.Count == Contract.OldValue(this.MusicList.Count) - 1);
     this.MusicList.Remove(music);
 }
示例#4
0
 public void addMusic(Music music)
 {
     Contract.Requires(music != null);
     Contract.Ensures(this.MusicList.Count == Contract.OldValue(this.MusicList.Count) + 1);
     this.MusicList.Add(music);
 }