using System.Collections.Generic;
using System.IO;
using Habanero.Base;
using Habanero.BO.Loaders;

namespace <<PROJECT_NAME>>
{
    public static class BOBroker
    {
        public static string GetClassDefsXml()
        {
            StreamReader classDefStream = new StreamReader(
                typeof(BOBroker).Assembly.GetManifestResourceStream("<<PROJECT_NAME>>.ClassDefs.xml"));
            return classDefStream.ReadToEnd();
        }

		public static IEnumerable<IClassDef> GetClassDefs()
		{
			var loadedClassDefs = new XmlClassDefsLoader(BOBroker.GetClassDefsXml(), new DtdLoader()).LoadClassDefs();
			//AllClassesAutoMapper.ClassDefCol = loadedClassDefs;
			//var allClassesAutoMapper = new AllClassesAutoMapper(new AssemblyTypeSource(typeof (SalesSource)));
			//allClassesAutoMapper.Map();
			return loadedClassDefs;
		}

    }
}