当前位置: 首页>>代码示例>>C#>>正文


C# Song.AddArtist方法代码示例

本文整理汇总了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();

		}
开发者ID:realzhaorong,项目名称:vocadb,代码行数:16,代码来源:TagFormatterTests.cs

示例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();

			}

		}
开发者ID:realzhaorong,项目名称:vocadb,代码行数:59,代码来源:TestDatabase.cs

示例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 };

		}
开发者ID:realzhaorong,项目名称:vocadb,代码行数:20,代码来源:AlbumTests.cs

示例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);
        }
开发者ID:realzhaorong,项目名称:vocadb,代码行数:17,代码来源:SongSearchTests.cs

示例5: AddArtist

 private void AddArtist(Song song, Artist artist)
 {
     if (!song.HasArtist(artist))
         song.AddArtist(artist);
 }
开发者ID:realzhaorong,项目名称:vocadb,代码行数:5,代码来源:SongTagger.cs


注:本文中的Song.AddArtist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。