Files
ZelWiki/TightWiki.Repository/ManagedDataStorage.cs
2025-01-22 23:31:03 +08:00

41 lines
1.7 KiB
C#

using NTDLS.SqliteDapperWrapper;
namespace TightWiki.Repository
{
/// <summary>
/// Stores instances of ManagedDataStorageFactories that are used to store various parts of the data for the site.
/// </summary>
public static class ManagedDataStorage
{
private static (string Name, ManagedDataStorageFactory Factory)[]? _collection = null;
public static (string Name, ManagedDataStorageFactory Factory)[] Collection
{
get
{
_collection ??=
[
("DeletedPageRevisions", DeletedPageRevisions),
("DeletedPages", DeletedPages),
("Pages", Pages),
("Statistics", Statistics),
("Emoji", Emoji),
("Exceptions", Exceptions),
("Users", Users),
("Config", Config)
];
return _collection;
}
}
public static ManagedDataStorageFactory DeletedPageRevisions { get; private set; } = new();
public static ManagedDataStorageFactory DeletedPages { get; private set; } = new();
public static ManagedDataStorageFactory Pages { get; private set; } = new();
public static ManagedDataStorageFactory Statistics { get; private set; } = new();
public static ManagedDataStorageFactory Emoji { get; private set; } = new();
public static ManagedDataStorageFactory Exceptions { get; private set; } = new();
public static ManagedDataStorageFactory Users { get; private set; } = new();
public static ManagedDataStorageFactory Config { get; private set; } = new();
}
}