This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using AyaNova.Biz;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal static class DataListFactory
|
||||
{
|
||||
{
|
||||
internal static IAyaDataList GetAyaDataList(string ListKey)
|
||||
{
|
||||
switch (ListKey)
|
||||
@@ -14,5 +17,25 @@ namespace AyaNova.DataList
|
||||
throw new System.ArgumentOutOfRangeException($"DataListFactory: Unknown list \"{ListKey}\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal static List<string> GetListOfAllDataListKeyNames()
|
||||
{
|
||||
|
||||
List<string> ret = new List<string>();
|
||||
System.Reflection.Assembly ass = System.Reflection.Assembly.GetEntryAssembly();
|
||||
|
||||
foreach (System.Reflection.TypeInfo ti in ass.DefinedTypes)
|
||||
{
|
||||
if (ti.ImplementedInterfaces.Contains(typeof(IAyaDataList)))
|
||||
{
|
||||
ret.Add(ti.Name);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}//eoc
|
||||
}//eons
|
||||
Reference in New Issue
Block a user