This commit is contained in:
2020-01-21 16:28:44 +00:00
parent ff26081d6b
commit 382445f8c3
2 changed files with 39 additions and 40 deletions

View File

@@ -4,16 +4,14 @@ namespace AyaNova.DataList
{
internal static class DataListFactory
{
internal const string TEST_WIDGET_USER_EMAIL_ADDRESS_LIST_KEY = "TEST_WIDGET_USER_EMAIL_ADDRESS_LIST";//for development testing, not a real thing going forward
internal static IAyaDataList GetAyaDataList(string ListKey)
{
switch (ListKey)
{
case TEST_WIDGET_USER_EMAIL_ADDRESS_LIST_KEY:
case nameof(TestWidgetUserEmail):
return new TestWidgetUserEmail();
default:
throw new System.ArgumentOutOfRangeException($"DataListFactory: Unknown key \"{ListKey}\"");
throw new System.ArgumentOutOfRangeException($"DataListFactory: Unknown list \"{ListKey}\"");
}
}
}

View File

@@ -5,7 +5,7 @@ namespace AyaNova.DataList
internal class TestWidgetUserEmail : IAyaDataList
{
public string ListKey => DataListFactory.TEST_WIDGET_USER_EMAIL_ADDRESS_LIST_KEY;
public string ListKey => nameof(TestWidgetUserEmail);
public string SQLFrom => "throw new System.NotImplementedException()";
@@ -47,6 +47,7 @@ namespace AyaNova.DataList
SqlValueColumnName = "awidget.active",
UiFieldDataType = (int)AyaUiFieldDataType.Bool
});
return l;
}
}