public ContentTypeValidation(ContentTypeGroup contentTypeGroup) { if (contentTypeGroup == ContentTypeGroup.Photo) { validTypes = new string[] { "image/jpeg", "image/png", "image/gif" }; } }
public ContentTypeValidator(ContentTypeGroup contentTypeGroup) { switch (contentTypeGroup) { case ContentTypeGroup.Image: _validContentTypes = _imageContentTypes; break; } }
public ContextTypeValidator(ContentTypeGroup contentTypeGroup) { switch (contentTypeGroup) { case ContentTypeGroup.Image: _ValidContentType = _ImageContentType; break; } }
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; } }
//این را من بهش میگم که 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; } }