Пример #1
0
        public static TitleViewModel Initialize(this TitleViewModel model, Animanga title, IEnumerable <UserMangaList> userLists, ITagTranslator tagTranslator)
        {
            model.Initialize(title, tagTranslator);
            model.UserListControls = new UserListsControlViewModel().Initialize(userLists, title);

            return(model);
        }
Пример #2
0
        public Comment Create(Profile profile, CommentSendViewModel comment, Animanga animanga)
        {
            var result = Create(profile, comment.Text);

            result.Anime = animanga as Anime;
            result.Manga = animanga as Manga;

            return(result);
        }
Пример #3
0
        private static TitleViewModel Initialize(this TitleViewModel model, Animanga title, ITagTranslator tagTranslator)
        {
            model.Key            = title.Key;
            model.Title          = title.Title;
            model.ImageSrc       = title.ImageSrc;
            model.StudioName     = title.StudioName;
            model.StudioImageSrc = title.StudioImageSrc;
            model.Description    = title.Description;
            model.Information    = new TitleInformationViewModel().Initialize(title.Information, tagTranslator.ToTag(title.Tag));
            model.Raiting        = new RaitingViewModel().Initialize(title.Raiting);
            model.InUserLists    = new TitleInUserListsViewModel().Initialize(/*title.UserLists*/);
            model.Links          = title.Links.Select(link => new LinkViewModel().Initialize(link)).ToList();

            return(model);
        }
Пример #4
0
        public static TitlePreviewViewModel Initialize(this TitlePreviewViewModel model, Animanga title)
        {
            model.Key      = title.Key;
            model.Name     = title.Title;
            model.ImageSrc = title.ImageSrc;
            model.Info     = title.StudioName;

            return(model);
        }
Пример #5
0
 /// <summary>
 /// Fake initializator
 /// </summary>
 public static UserListsControlViewModel Initialize(this UserListsControlViewModel model, IEnumerable <UserMangaList> userLists, Animanga title)
 {
     return(model);
 }