static void Main(string[] args) { _tracer = new Tracer(); MainExample first = new MainExample(_tracer); first.Execution(); ExtraExample second = new ExtraExample(_tracer); second.Life(); Thread deathThread = new Thread(first.Death); deathThread.Start(); Thread breatheThread = new Thread(second.Breathe); breatheThread.Start(); deathThread.Join(); breatheThread.Join(); first.Death(); second.Eat(); TraceResult result = _tracer.GetTraceResult(); OutputResults(result); }
public MainExample(ITracer tracer) { _tracer = tracer; _extra = new ExtraExample(tracer); rand = new Random(); }