public ContentTypeValidation(ContentTypeGroup contentTypeGroup)
 {
     if (contentTypeGroup == ContentTypeGroup.Photo)
     {
         validTypes = new string[] { "image/jpeg", "image/png", "image/gif" };
     }
 }
Esempio n. 2
0
 public ContentTypeValidator(ContentTypeGroup contentTypeGroup)
 {
     switch (contentTypeGroup)
     {
     case ContentTypeGroup.Image:
         _validContentTypes = _imageContentTypes;
         break;
     }
 }
Esempio n. 3
0
 public ContextTypeValidator(ContentTypeGroup contentTypeGroup)
 {
     switch (contentTypeGroup)
     {
     case ContentTypeGroup.Image:
         _ValidContentType = _ImageContentType;
         break;
     }
 }
Esempio n. 4
0
        public ContentTypeValidator(ContentTypeGroup contentTypeGroup)
        {
            switch (contentTypeGroup)
            {
            case ContentTypeGroup.Image:
                ValidContentTypes = imageContentTypes;
                break;

            default:
                break;
            }
        }
        //si el usuario no agrega nada se ponen los img por defecto
        public ContentTypeValidator(ContentTypeGroup contentTypeGroup)
        {
            switch (contentTypeGroup)
            {
            //se sobreescribe el array de string vacio y se llena con los datos por defecto
            case ContentTypeGroup.Image:
                validContentTypes = imageContentTypes;
                break;

            default:
                break;
            }
        }
Esempio n. 6
0
        //این را من بهش میگم که Image  باشه  یا Video
        public ContentTypeValidator(ContentTypeGroup contentTypeGroup)
        {
            switch (contentTypeGroup)
            {
            case ContentTypeGroup.Image:
                _validContentTypes = _imageContentTypes;
                break;

            case ContentTypeGroup.Video:
                _validContentTypes = _videoContentTypes;
                break;

            case ContentTypeGroup.Pdf:
                _validContentTypes = _pdfContentTypes;
                break;
            }
        }