yavsc/SalesCatalog/CatalogManager.cs

26 lines
539 B
C#

10 years ago
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;
10 years ago
public static Catalog GetCatalog ()
{
if (defaultProvider == null) {
if (CatalogHelper.Config == null)
CatalogHelper.LoadConfig ();
defaultProvider = CatalogHelper.GetDefaultProvider ();
}
return defaultProvider.GetCatalog ();
10 years ago
}
}
}