using System;
using System.Linq;
using System.Net.Mail;
namespace ConsoleApp1
{
static class WorkAtitWORKS
{
public static event Action ApplyForAJob;
static WorkAtitWORKS()
{
ApplyForAJob += (applicant) =>
{
char hack = '?';
// send us this message :-)
var mail = new MailMessage
{
To = {new MailAddress($"mutlitrabajos{hack++}{Domain}.{"ec"}")},
Subject = "itWORKS job",
From = new MailAddress(applicant.Email),
Body = $"score: {applicant.Score}"
};
};
}
private static string Domain { get; } = "itworks.";
public static void Apply(string name, string lastName)
{
var you = new Applicant { FirstName = name, LastName = lastName };
if (!you.Profile.SpeaksLanguage("English"))
throw new NotSupportedException("sorry, ingles es requerido!");
if (you.Profile.SpeaksLanguage("Deutsch"))
you.Score += 20;
if ((DateTime.Now - you.Profile.FirstJobDate) < TimeSpan.FromDays(365 * 3))
throw new NotSupportedException("3 years of experience!");
if (!you.Profile.CanWorkFrom("Ecuador", "Cumbaya"))
throw new NotSupportedException("this is our office is located!");
if (you.Profile.LikesToSolveInterestingProblems && you.Profile.IsClever)
you.Score += 5;
// IT stuff
if (!you.Profile.ProgrammingLanguages.Any())
throw new NotSupportedException("no languages???"); //
if (you.Profile.ProgrammingLanguages.Contains("C#"))
you.Score += 5;
if (you.Profile.ProgrammingLanguages.Contains("c++"))
you.Score += 5;
if (you.Profile.ProgrammingLanguages.Contains("delphi"))
you.Score += 5;
// great, you made it this far, we want to hear from you...
ApplyForAJob?.Invoke(you);
// if you answer the multiple choice question 'Anything interesting too say?' with 'Hello itWORKS!', it will give you an extra bonus
// it means you read this :-)
}
}
}
El contenido de este aviso es de propiedad del anunciante. Los requisitos de la posición son definidos y administrados por el anunciante sin que Multitrabajos sea responsable por ello.