mercredi 1 juillet 2015

Is this a case of builder pattern?

I am developing a simple ticket management system. When a ticket is created i have to perform 4-5 operations sequentially. Below is my code

pubic ActionResult CreateTicket(Ticket ticket)
{
    TicketRepository ts = new TicketRepository();

    if(ts.CreateTicket(ticket))
    {
        INotification emailNotification = new Email();
        emailNotification.SendTicketAlert();

        IResponsible assignToUser = new AssignToUser();
        assignToUser.assign();

        DummyObj obj = new DummyObj();
        obj.someDummyOperation();
    }
}

Do you think this is the case of builder pattern?

Aucun commentaire:

Enregistrer un commentaire