/// <summary> /// Dequeues all templates and fills document /// </summary> internal void WriteToDoc(DesignerFactory factory) { while (_templates.Count > 0) { _templates.Dequeue().AddParagraph(factory); } }
public override void AddParagraph(DesignerFactory desFactory) { desFactory.GetDesigner(_name) .Draw(String.Format(EMPL_PARAGRAPH, $"{_emplInfo.FirstName} {_emplInfo.Prefix} {_emplInfo.LastName}", _emplInfo.Employer.CompanyName) ); }
public override void AddParagraph(DesignerFactory desFactory) { var designer = desFactory.GetDesigner(_name); foreach (var answer in _question.Answers) { designer.Draw(answer.Name); } }
public override void AddParagraph(DesignerFactory desFactory) { var answer = _question.Answers.FirstOrDefault(); if (answer == null) { throw new ArgumentNullException(nameof(answer)); } desFactory.GetDesigner(_name).Draw(answer.Name); }
static void CriarPorAbstractFactory() { Console.WriteLine("\n~~Abstract Factory!~~\n"); FuncionarioAbstractFactory auxiliar = new AuxiliarFactory(); Financeiro financeiro = new Financeiro(auxiliar); financeiro.BuscarBonificacao(); FuncionarioAbstractFactory designer = new DesignerFactory(); Financeiro financeiro1 = new Financeiro(designer); financeiro1.BuscarBonificacao(); FuncionarioAbstractFactory diretor = new DiretorFactory(); Financeiro financeiro2 = new Financeiro(diretor); financeiro2.BuscarBonificacao(); }
public override void AddParagraph(DesignerFactory desFactory) => desFactory.GetDesigner(_name).Draw(_page.Name);
public override void AddParagraph(DesignerFactory desFactory) => desFactory.GetDesigner(_name).Draw(TITLE_DOC);
/// <summary> /// Adds paragraph to document /// </summary> public abstract void AddParagraph(DesignerFactory desFactory);
public override void AddParagraph(DesignerFactory desFactory) => desFactory.GetDesigner(_name).Draw(_question.QuestionName);