Esempio n. 1
0
 public FilmsController(IFilm films, IProducer producers, IPoster posters, SignInManager <User> signInManager)
 {
     this.films     = films;
     this.producers = producers;
     this.posters   = posters;
     _signInManager = signInManager;
 }
Esempio n. 2
0
 public FilmController(IFilm filmSrv, IBlogic <CategoryEntity> categorySrv, IBlogic <FilmCrewEntity> filmCrewSrv, IPoster posterSrv)
 {
     this.filmSrv     = filmSrv;
     this.filmCrewSrv = filmCrewSrv;
     this.categorySrv = categorySrv;
     this.posterSrv   = posterSrv;
 }
Esempio n. 3
0
 public void SaveCommit(IPoster poster, out bool success)
 {
     using (IUnitOfWork uow = UnitOfWork.Begin())
     {
         Save(poster, out success);
         if (success)
             uow.Commit();
     }
 }
Esempio n. 4
0
        public void DeleteCommit(IPoster poster)
        {
            Checks.Argument.IsNotNull(poster, "poster");

            using (IUnitOfWork u = UnitOfWork.Begin())
            {
                _repo.Remove(poster);
                u.Commit();
            }
        }
Esempio n. 5
0
 public void SaveCommit(IPoster poster, out bool success)
 {
     using (IUnitOfWork uow = UnitOfWork.Begin())
     {
         Save(poster, out success);
         if (success)
         {
             uow.Commit();
         }
     }
 }
Esempio n. 6
0
        public Trailer(string aId, string aTitle, string aRunTime, string aRating, string aStudio, string aDirector, string aDescription,
                       IList <string> aCast, IList <string> aGenre, IPoster aPoster, IVideo aVideo)
        {
            iId = aId;

            iMetadata       = new videoItem();
            iMetadata.Id    = aId;
            iMetadata.Title = aTitle;
            iMetadata.Genre.AddRange(aGenre);

            string[] directors = aDirector.Split(',');
            foreach (string s in directors)
            {
                iMetadata.Director.Add(s.Trim());
            }

            foreach (string s in aCast)
            {
                actor actor = new actor();
                actor.Actor = s;
                iMetadata.Actor.Add(actor);
            }

            iMetadata.LongDescription = aDescription;
            iMetadata.Publisher       = aStudio;
            iMetadata.Rating          = aRating;

            if (!string.IsNullOrEmpty(aPoster.UriSmall))
            {
                iMetadata.AlbumArtUri.Add(aPoster.UriSmall);
            }

            resource res = new resource();

            try
            {
                res.Duration = (new Time(string.Format("0:{0}", aRunTime))).ToString();
            }
            catch (Time.TimeInvalid)
            {
                res.Duration = (new Time(0)).ToString();
            }
            res.Size         = aVideo.Size;
            res.ProtocolInfo = "http-get:*:video/x-m4v:*";
            res.Uri          = aVideo.Uri;

            iMetadata.Res.Add(res);
        }
Esempio n. 7
0
        //consider changing the out parameter to a validation type object
        public void Save(IPoster poster, out bool success)
        {
            Checks.Argument.IsNotNull(poster, "poster");

            success = false;

            if (null == _repo.FindByPosterId(poster.PosterId))
            {
                try
                {
                    _repo.Add(poster);
                    success = true;
                }
                catch (Exception ex)
                {
                    success = false;
                }
            }
        }
Esempio n. 8
0
        //consider changing the out parameter to a validation type object
        public void Save(IPoster poster, out bool success)
        {
            Checks.Argument.IsNotNull(poster, "poster");

            success = false;

            if (null == _repo.FindByPosterId(poster.PosterId))
            {
                try
                {
                    _repo.Add(poster);
                    success = true;
                }
                catch (Exception ex)
                {
                    success = false;
                }
            }
        }
Esempio n. 9
0
 public PosterController(IWebHostEnvironment webHostEnvironment, IPoster posters)
 {
     this.webHostEnvironment = webHostEnvironment;
     this.posters            = posters;
 }
Esempio n. 10
0
        public void Delete(IPoster poster)
        {
            Checks.Argument.IsNotNull(poster, "poster");

            _repo.Remove(poster);
        }
Esempio n. 11
0
        public void DeleteCommit(IPoster poster)
        {
            Checks.Argument.IsNotNull(poster, "poster");

            using (IUnitOfWork u = UnitOfWork.Begin())
            {
                _repo.Remove(poster);
                u.Commit();
            }
        }
Esempio n. 12
0
 public Uri CreateBackdropLink(IPoster poster, BackdropSize backdropSize  = BackdropSize.w720) => CreateBackdropLink(poster.PosterPath, backdropSize);
Esempio n. 13
0
        public void Delete(IPoster poster)
        {
            Checks.Argument.IsNotNull(poster, "poster");

            _repo.Remove(poster);
        }
Esempio n. 14
0
 public RecordTemplatesController(IPoster <RecordTemplate> repository) => _repository = repository;
Esempio n. 15
0
 public AppPoster(IPoster IPoster)
 {
     _IPoster = IPoster;
 }
Esempio n. 16
0
 public DiagnosesController(IPoster <Diagnosys> repository) => _repository = repository;
Esempio n. 17
0
 public Uri CreatePosterLink(IPoster poster, PosterSize posterSize  = PosterSize.w500) => CreatePosterLink(poster.PosterPath, posterSize);