public FilmsController(IFilm films, IProducer producers, IPoster posters, SignInManager <User> signInManager) { this.films = films; this.producers = producers; this.posters = posters; _signInManager = signInManager; }
public FilmController(IFilm filmSrv, IBlogic <CategoryEntity> categorySrv, IBlogic <FilmCrewEntity> filmCrewSrv, IPoster posterSrv) { this.filmSrv = filmSrv; this.filmCrewSrv = filmCrewSrv; this.categorySrv = categorySrv; this.posterSrv = posterSrv; }
public void SaveCommit(IPoster poster, out bool success) { using (IUnitOfWork uow = UnitOfWork.Begin()) { Save(poster, out success); if (success) uow.Commit(); } }
public void DeleteCommit(IPoster poster) { Checks.Argument.IsNotNull(poster, "poster"); using (IUnitOfWork u = UnitOfWork.Begin()) { _repo.Remove(poster); u.Commit(); } }
public void SaveCommit(IPoster poster, out bool success) { using (IUnitOfWork uow = UnitOfWork.Begin()) { Save(poster, out success); if (success) { uow.Commit(); } } }
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); }
//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; } } }
public PosterController(IWebHostEnvironment webHostEnvironment, IPoster posters) { this.webHostEnvironment = webHostEnvironment; this.posters = posters; }
public void Delete(IPoster poster) { Checks.Argument.IsNotNull(poster, "poster"); _repo.Remove(poster); }
public Uri CreateBackdropLink(IPoster poster, BackdropSize backdropSize = BackdropSize.w720) => CreateBackdropLink(poster.PosterPath, backdropSize);
public RecordTemplatesController(IPoster <RecordTemplate> repository) => _repository = repository;
public AppPoster(IPoster IPoster) { _IPoster = IPoster; }
public DiagnosesController(IPoster <Diagnosys> repository) => _repository = repository;
public Uri CreatePosterLink(IPoster poster, PosterSize posterSize = PosterSize.w500) => CreatePosterLink(poster.PosterPath, posterSize);