예제 #1
0
        public void doSomeMainWork()
        {
            logger.logLine("MainSystem", "doing some main work");

            SubSystem subSystem = new SubSystem();

            subSystem.doSomeWork();
            subSystem.doSomeMoreWork();
        }
예제 #2
0
        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");
        }
예제 #3
0
 public MainSystem()
 {
     subsystem = new SubSystem();
     logger    = Logger.GetInstance();
 }