Добавление методов в интерфейс и класс

This commit is contained in:
prodigygirl 2022-11-05 19:29:12 +04:00
parent ee3326095d
commit e778b6b060
2 changed files with 8 additions and 0 deletions

View File

@ -33,5 +33,8 @@ namespace ArmoredCar
if (_armCar != null)
_armCar.DrawTransport(g);
}
public string GetInfo() => _armCar?.GetDataForSave();
public static IDrawningObject Create(string data) => new
DrawningObjectArmCar(data.CreateDrawningArmoredCar());
}
}

View File

@ -36,5 +36,10 @@ namespace ArmoredCar
/// </summary>
/// <returns></returns>
(float Left, float Right, float Top, float Bottom) GetCurrentPosition();
/// <summary>
/// Получение информации по объекту
/// </summary>
/// <returns></returns>
string GetInfo();
}
}