private static void Main() { var transfer = new TransferMoneyTask(); var report = new GenerateReportTask(); transfer.Execute(); report.Execute(); }
public static void Run() { var tranMoney = new TransferMoneyTask(new AuditTrail()); var depoMoney = new DepositMoneyTask(new AuditTrail()); tranMoney.Execute(); depoMoney.Execute(); }
/// <summary> /// By using an abstract base class code duplication can be removed if multiple classes would do the same methods. /// </summary> static void Template() { var transferMoneyTask = new TransferMoneyTask(); transferMoneyTask.Execute(); var generateReportTask = new GenerateReportTask(); generateReportTask.Execute(); }
private static void ExecuteTemplate() { var generateReport = new GenerateReportTask(); generateReport.Execute(); var transferMoney = new TransferMoneyTask(); transferMoney.Execute(); }
static void TestTemplateMethod() { // This will first execute Audit Trail and then call the Transfer Money operations var transferMoney = new TransferMoneyTask(); transferMoney.Execute(); // This will first execute Audit Trail and then call the Generate Report operations var generateReport = new GenerateReportTask(); generateReport.Execute(); }
public static void Behavioral_TemplateMethod() { // Transfer Money // Generate Report var task = new TransferMoneyTask(); task.Execute(); var report = new GenerateReportTask(); report.Execute(); }