Exemple #1
0
        private static void logObjectState(string carObjName, ICar carObj)
        {
            log.AppendLine(IDENTATION_LEVEL, $"\t{carObjName}: {carObj.GetType().Name}");

            IEngine engine            = carObj.GetEngine();
            string  engineDescription = engine.GetDescription();

            IShift shift            = carObj.GetShift();
            string shiftDescription = shift.GetDescription();


            log.AppendLine(IDENTATION_LEVEL, $"\t\tEngine = {engineDescription}");
            log.AppendLine(IDENTATION_LEVEL, $"\t\tShift  = {shiftDescription}");
        }