yavsc/SalesCatalog/CatalogManager.cs

25 lines
539 B
C#
Raw Normal View History

2014-07-16 20:35:03 +02:00
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;
2014-07-16 20:35:03 +02:00
public static Catalog GetCatalog ()
{
if (defaultProvider == null) {
if (CatalogHelper.Config == null)
CatalogHelper.LoadConfig ();
defaultProvider = CatalogHelper.GetDefaultProvider ();
}
return defaultProvider.GetCatalog ();
2014-07-16 20:35:03 +02:00
}
}
}