示例#1
0
        public static bool IsValidCvFile(this InboundAttachment attachment)
        {
            var names = attachment.InboundEmail.SenderName.ToLower().Split(new[] { ' ', '-' }, StringSplitOptions.RemoveEmptyEntries);

            var file = attachment.OriginalFileName.ToLower();

            return(file.Contains("cv") || file.Contains("resume") ||
                   file.Contains("vitae") || file.Contains("curricu") ||
                   names.Any(name => file.Contains(name.Trim())));
        }
示例#2
0
        public static bool IsWordDocument(this InboundAttachment attachment)
        {
            switch (attachment.FileType)
            {
            case "DOC":
            case "DOCX":
                return(true);
            }

            return(false);
        }
示例#3
0
 public static bool IsPdfDocument(this InboundAttachment attachment)
 {
     return(attachment.FileType == "PDF");
 }