本文整理汇总了C#中Song.AddArtist方法的典型用法代码示例。如果您正苦于以下问题:C# Song.AddArtist方法的具体用法?C# Song.AddArtist怎么用?C# Song.AddArtist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Song
的用法示例。
在下文中一共展示了Song.AddArtist方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetUp
public void SetUp() {
producer = new Artist(TranslatedString.Create("Tripshots")) { ArtistType = ArtistType.Producer };
vocalist = new Artist(new TranslatedString("初音ミク", "Hatsune Miku", "Hatsune Miku")) { ArtistType = ArtistType.Vocaloid };
song = new Song(new LocalizedString("Nebula", ContentLanguageSelection.English));
song.AddArtist(producer);
song.AddArtist(vocalist);
song.UpdateArtistString();
album = new Album(new LocalizedString("Synthesis", ContentLanguageSelection.English));
album.AddSong(song, trackNum: 5, discNum: 1);
target = new TagFormatter();
}
示例2: Seed
private void Seed(ISessionFactory sessionFactory) {
using (var session = sessionFactory.OpenSession())
using (var tx = session.BeginTransaction()) {
Producer = new Artist(TranslatedString.Create("Junk")) { Id = ProducerId };
session.Save(Producer);
Producer2 = new Artist(TranslatedString.Create("Junky"));
session.Save(Producer2);
Producer3 = new Artist(TranslatedString.Create("Keeno"));
session.Save(Producer3);
var tag = new Tag("Electronic");
session.Save(tag);
Song = new Song(new LocalizedString("Nebula", ContentLanguageSelection.English)) {
Id = SongId, SongType = SongType.Original, FavoritedTimes = 1, PVServices = PVServices.Youtube, CreateDate = new DateTime(2012, 6, 1)
};
Song.Lyrics.Add(new LyricsForSong(Song, ContentLanguageSelection.English, "Here be lyrics", string.Empty));
Song.Tags.Usages.Add(new SongTagUsage(Song, tag));
session.Save(Song);
Song2 = new Song(new LocalizedString("Tears of Palm", ContentLanguageSelection.English)) {
Id = Song2Id, SongType = SongType.Original, PVServices = PVServices.Youtube, CreateDate = new DateTime(2012, 6, 1)
};
Song2.Lyrics.Add(new LyricsForSong(Song2, ContentLanguageSelection.Romaji, "Here be lyrics", string.Empty));
session.Save(Song2);
Song3 = new Song(new LocalizedString("Crystal Tears", ContentLanguageSelection.English)) {
Id = SongWithArtistId, FavoritedTimes = 39, CreateDate = new DateTime(2012, 1, 1)
};
Song3.AddArtist(Producer);
session.Save(Song3);
Song4 = new Song(new LocalizedString("Azalea", ContentLanguageSelection.English)) {
CreateDate = new DateTime(2012, 1, 1)
};
Song4.AddArtist(Producer);
session.Save(Song4);
Song5 = new Song(new LocalizedString("Melancholic", ContentLanguageSelection.English)) {
CreateDate = new DateTime(2012, 1, 1)
};
Song5.AddArtist(Producer2);
session.Save(Song5);
Song6 = new Song(new LocalizedString("Tears", ContentLanguageSelection.English)) {
CreateDate = new DateTime(2012, 1, 1)
};
Song6.AddArtist(Producer3);
session.Save(Song6);
tx.Commit();
}
}
示例3: SetUp
public void SetUp() {
album = new Album(new LocalizedString("Synthesis", ContentLanguageSelection.English));
producer = new Artist(TranslatedString.Create("Tripshots")) { Id = 1, ArtistType = ArtistType.Producer };
vocalist = new Artist(TranslatedString.Create("Hatsune Miku")) { Id = 39, ArtistType = ArtistType.Vocaloid };
producerContract = new ArtistContract(producer, ContentLanguagePreference.Default);
vocalistContract = new ArtistContract(vocalist, ContentLanguagePreference.Default);
song1 = new Song(new LocalizedString("Nebula", ContentLanguageSelection.English)) { Id = 2 };
song1.AddArtist(producer);
album.AddArtist(producer);
album.AddArtist(vocalist);
var songInAlbum = new SongInAlbum(song1, album, 1, 1);
songInAlbumContract = new SongInAlbumEditContract(songInAlbum, ContentLanguagePreference.Default);
songInAlbumContract.Artists = new[] { producerContract };
}
示例4: SetUp
public void SetUp()
{
querySource = new QuerySourceList();
artist = new Artist(TranslatedString.Create("Junk")) { Id = 257 };
song = new Song(new LocalizedString("Nebula", ContentLanguageSelection.English)) { Id = 121, SongType = SongType.Original, PVServices = PVServices.Youtube, CreateDate = new DateTime(2012, 6, 1) };
AddSong(song);
songWithArtist = new Song(new LocalizedString("Crystal Tears", ContentLanguageSelection.English)) { Id = 7787, FavoritedTimes = 39, CreateDate = new DateTime(2012, 1, 1) };
songWithArtist.AddArtist(artist);
AddSong(songWithArtist);
queryParams = new SongQueryParams();
search = new Model.Service.Search.SongSearch.SongSearch(querySource, ContentLanguagePreference.Default);
}
示例5: AddArtist
private void AddArtist(Song song, Artist artist)
{
if (!song.HasArtist(artist))
song.AddArtist(artist);
}