From c40f19e7c792c6298e531c085f5e1ae00a30fd25 Mon Sep 17 00:00:00 2001 From: fede Date: Sun, 7 Apr 2024 20:00:06 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20a=C3=B1adido=20listar=20repositorio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Modelo/Modelo.sln | 25 +++++++++++++++++++++++++ Modelo/RepositorioBase.cs | 6 ++++++ 2 files changed, 31 insertions(+) create mode 100644 Modelo/Modelo.sln diff --git a/Modelo/Modelo.sln b/Modelo/Modelo.sln new file mode 100644 index 0000000..515476b --- /dev/null +++ b/Modelo/Modelo.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.002.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Modelo", "Modelo.csproj", "{332ACC5A-D3E1-4E7A-A363-BDC1CB370350}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {332ACC5A-D3E1-4E7A-A363-BDC1CB370350}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {332ACC5A-D3E1-4E7A-A363-BDC1CB370350}.Debug|Any CPU.Build.0 = Debug|Any CPU + {332ACC5A-D3E1-4E7A-A363-BDC1CB370350}.Release|Any CPU.ActiveCfg = Release|Any CPU + {332ACC5A-D3E1-4E7A-A363-BDC1CB370350}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DFA3F249-7A0D-474C-A190-5C2E568DFB1C} + EndGlobalSection +EndGlobal diff --git a/Modelo/RepositorioBase.cs b/Modelo/RepositorioBase.cs index 7d59846..5f1b2b5 100644 --- a/Modelo/RepositorioBase.cs +++ b/Modelo/RepositorioBase.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.ObjectModel; namespace Modelo { @@ -24,6 +25,11 @@ namespace Modelo } } + // Lista el contenido del repositorio + public ReadOnlyCollection Listar(){ + return almacen.AsReadOnly(); + } + // Añade objetos al almacen abstract public bool Add(T t);