Create ShapeContainer.cs
This commit is contained in:
13
DrawFigureLibrary/ShapeContainer.cs
Normal file
13
DrawFigureLibrary/ShapeContainer.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace DrawFigureLibrary
|
||||
{
|
||||
public static class ShapeContainer
|
||||
{
|
||||
public static List<Figure> FigureList { get; } = new List<Figure>();
|
||||
|
||||
public static void AddFigure(Figure fig) => FigureList.Add(fig);
|
||||
|
||||
public static bool RemoveFigure(Figure fig) => FigureList.Remove(fig);
|
||||
|
||||
public static Figure? FindByName(string name) => FigureList.FirstOrDefault(f => f.Name == name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user