Esempio n. 1
0
 /// <summary>
 /// Dequeues all templates and fills document
 /// </summary>
 internal void WriteToDoc(DesignerFactory factory)
 {
     while (_templates.Count > 0)
     {
         _templates.Dequeue().AddParagraph(factory);
     }
 }
Esempio n. 2
0
 public override void AddParagraph(DesignerFactory desFactory)
 {
     desFactory.GetDesigner(_name)
     .Draw(String.Format(EMPL_PARAGRAPH,
                         $"{_emplInfo.FirstName} {_emplInfo.Prefix} {_emplInfo.LastName}",
                         _emplInfo.Employer.CompanyName)
           );
 }
Esempio n. 3
0
        public override void AddParagraph(DesignerFactory desFactory)
        {
            var designer = desFactory.GetDesigner(_name);

            foreach (var answer in _question.Answers)
            {
                designer.Draw(answer.Name);
            }
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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();
        }
Esempio n. 6
0
 public override void AddParagraph(DesignerFactory desFactory)
 => desFactory.GetDesigner(_name).Draw(_page.Name);
Esempio n. 7
0
 public override void AddParagraph(DesignerFactory desFactory)
 => desFactory.GetDesigner(_name).Draw(TITLE_DOC);
Esempio n. 8
0
 /// <summary>
 /// Adds paragraph to document
 /// </summary>
 public abstract void AddParagraph(DesignerFactory desFactory);
 public override void AddParagraph(DesignerFactory desFactory)
 => desFactory.GetDesigner(_name).Draw(_question.QuestionName);