yavsc/SalesCatalog/CatalogManager.cs
Paul Schneider 8254336767 * CatalogHelper.cs: Configuration loading
* Web.csproj:
* CatalogManager.cs:
2014-10-10 14:15:52 +02:00

25 lines
539 B
C#

using System;
using SalesCatalog.Model;
namespace SalesCatalog
{
/// <summary>
/// Catalog manager.
/// Use this class to retreive the catalog or its elements
/// </summary>
public static class CatalogManager
{
private static CatalogProvider defaultProvider = null;
public static Catalog GetCatalog ()
{
if (defaultProvider == null) {
if (CatalogHelper.Config == null)
CatalogHelper.LoadConfig ();
defaultProvider = CatalogHelper.GetDefaultProvider ();
}
return defaultProvider.GetCatalog ();
}
}
}