|
@@ -44,6 +44,8 @@ public static class DbFactory
|
|
|
|
|
|
public static string? ColorScheme { get; set; }
|
|
|
public static byte[]? Logo { get; set; }
|
|
|
+
|
|
|
+ public static Type DefaultStore { get; set; } = typeof(Store<>);
|
|
|
|
|
|
// See notes in Request.DatabaseInfo class
|
|
|
// Once RPC transport is stable, these settings need
|
|
@@ -351,7 +353,7 @@ public static class DbFactory
|
|
|
|
|
|
public static IStore FindStore(Type type, Guid userguid, string userid, Platform platform, string version, Logger logger)
|
|
|
{
|
|
|
- var defType = typeof(Store<>).MakeGenericType(type);
|
|
|
+ var defType = DefaultStore.MakeGenericType(type);
|
|
|
Type? subType = Stores.Where(myType => myType.IsSubclassOf(defType)).FirstOrDefault();
|
|
|
|
|
|
var store = (Activator.CreateInstance(subType ?? defType) as IStore)!;
|