Add code examples, and documentation

This commit is contained in:
Aaron Po
2026-08-12 00:03:32 -04:00
commit 77c16e69f6
79 changed files with 4458 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
namespace CarEngineFacade;
internal class Program
{
private static void Main(string[] args)
{
//// without the facade, starting the engine involves creating all the objects
//var airflow = new AirFlowController();
//var fuel = new FuelInjector();
//var start = new Starter();
//var cool = new CoolingController();
//var cat = new CatalyticConverter();
//// then performing all the steps in the correct order
//airflow.TakeAir();
//fuel.On();
//fuel.Inject();
//start.Start();
//cool.Run();
//cat.On();
//// and shut down also requires steps in the correct order
//fuel.Off();
//cat.Off();
//cool.Cool();
//cool.Stop();
//airflow.Off();
// with the Facade, all creation is handled internally
var facade = new Facade();
// as is starting
facade.Start();
// and stopping
facade.Stop();
}
}