Exemple #1
0
        public Video(Canal canal, PlayList playList, string titulo, string descricao, string tags, int?ordemNaPlayList, string idVideoYoutube, Usuario usuarioSugeriu)
        {
            Canal           = canal;
            PlayList        = playList;
            Titulo          = titulo;
            Descricao       = descricao;
            Tags            = tags;
            OrdemNaPlayList = ordemNaPlayList.HasValue ? ordemNaPlayList.Value : 0;
            IdVideoYoutube  = idVideoYoutube;
            UsuarioSugeriu  = usuarioSugeriu;
            Status          = EnumStatus.EmAnalise;

            new AddNotifications <Video>(this)
            .IfNullOrInvalidLength(x => x.Titulo, 1, 200, MSG.X0_OBRIGATORIO_E_DEVE_CONTER_ENTRE_X1_E_X2_CARACTERES.ToFormat("Titulo", "1", "200"))
            .IfNullOrInvalidLength(x => x.Descricao, 1, 255, MSG.X0_OBRIGATORIA_E_DEVE_CONTER_ENTRE_X1_E_X2_CARACTERES.ToFormat("Descrição", "1", "255"))
            .IfNullOrInvalidLength(x => x.Tags, 1, 50, MSG.X0_OBRIGATORIA_E_DEVE_CONTER_ENTRE_X1_E_X2_CARACTERES.ToFormat("Tag", "1", "100"))
            .IfNullOrInvalidLength(x => x.IdVideoYoutube, 1, 50, MSG.X0_OBRIGATORIA_E_DEVE_CONTER_ENTRE_X1_E_X2_CARACTERES.ToFormat("Id do Youtube", "1", "50"));

            AddNotifications(canal);

            if (playList != null)
            {
                AddNotifications(playList);
            }
        }
Exemple #2
0
 public Video(Canal canal, PlayList playList, string titulo, string descricao, string tags, int?ordemNaPlayList, string idVideoYoutube)
 {
     Canal                = canal;
     PlayList             = playList;
     Titulo               = titulo;
     Descricao            = descricao;
     Tags                 = tags;
     this.ordemNaPlayList = ordemNaPlayList;
     IdVideoYoutube       = idVideoYoutube;
 }
        public Video(Canal canal, PlayList playList, string titulo, string descricao, string tags, int?ordemNaPlaylist, string idVideoYoutube, Usuario usuario)
        {
            Canal           = canal;
            PlayList        = playList;
            Titulo          = titulo;
            Descricao       = descricao;
            Tags            = tags;
            OrdemNaPlaylist = ordemNaPlaylist.HasValue ? ordemNaPlaylist.Value : 0;
            IdVideoYoutube  = idVideoYoutube;
            Usuario         = usuario;
            Status          = EnumStatus.EmAnalise;

            new AddNotifications <Video>(this)
            .IfNullOrInvalidLength(x => x.Titulo, 1, 200, "Título obrigatório");

            AddNotifications(canal);

            if (playList != null)
            {
                AddNotifications(playList);
            }
        }
Exemple #4
0
        public Video(Canal canal, PlayList playList, string titulo, string descricao, string tags, int ordemNaPlayList, string idVideoYoutube)
        {
            Canal                = canal;
            PlayList             = playList;
            Titulo               = titulo;
            Descricao            = descricao;
            Tags                 = tags;
            this.ordemNaPlayList = ordemNaPlayList;
            IdVideoYoutube       = idVideoYoutube;

            new AddNotifications <Video>(this)
            .IfNullOrInvalidLength(x => x.Titulo, 1, 200, "Titulo obrigatório e deve conter de 1 a 200 caracteres")
            .IfNullOrInvalidLength(x => x.Descricao, 1, 250, "Descricao obrigatória e deve conter entre 1 a 50 caractares")
            .IfNullOrInvalidLength(x => x.Tags, 1, 50, "Tag obrigatória e deve conter enre 1 a 50 caracateres")
            .IfNullOrInvalidLength(x => x.IdVideoYoutube, 1, 50, "IdVideoYoutube é obrigatório e deve conter entre 1 a 50 caracteres");

            AddNotifications(canal);

            if (playList != null)
            {
                AddNotifications(playList);
            }
        }