public void doSomeMainWork() { logger.logLine("MainSystem", "doing some main work"); SubSystem subSystem = new SubSystem(); subSystem.doSomeWork(); subSystem.doSomeMoreWork(); }
private void Start() { Logger.Instance.Log("main", "starting"); MainSystem mainSystem = new MainSystem(); //This could be a one-liner SubSystem subSystem = new SubSystem(); mainSystem.DoSomeMainWork(); // ^^ subSystem.DoSomeWork(); subSystem.DoSomeWork(); Logger.Instance.Log("main", "finishing"); }
public MainSystem() { subsystem = new SubSystem(); logger = Logger.GetInstance(); }