Пример #1
0
        public EntryReportContract(EntryReport report, ContentLanguagePreference languagePreference)
        {
            ParamIs.NotNull(() => report);

            Created = report.Created;
            Entry = new EntryRefWithNameContract(report.EntryBase, languagePreference);
            Hostname = report.Hostname;
            Id = report.Id;
            Notes = report.Notes;
            User = (report.User != null ? new UserBaseContract(report.User) : null);
        }
Пример #2
0
		public EntryReportContract Create(EntryReport report, ContentLanguagePreference languagePreference) {

			if (report is AlbumReport)
				return new EntryReportContract((AlbumReport)report, languagePreference);

			if (report is ArtistReport)
				return new EntryReportContract((ArtistReport)report, languagePreference);

			if (report is SongReport)
				return new EntryReportContract((SongReport)report, languagePreference);

			if (report is UserReport)
				return new EntryReportContract((UserReport)report, languagePreference);

			return new EntryReportContract(report, languagePreference);

		}