Files: added generic methods for virtual rooms

This commit is contained in:
Maksim Chegulov 2022-04-26 02:13:30 +03:00
parent 33d2f638ad
commit ff87612892

View File

@ -335,6 +335,11 @@ public class GlobalFolder
return result;
}
public async ValueTask<T> GetFolderVirtualRooms<T>(IDaoFactory daoFactory)
{
return (T)Convert.ChangeType(await GetFolderVirtualRooms(daoFactory), typeof(T));
}
public async ValueTask<int> GetFolderArchive(IDaoFactory daoFactory)
{
if (!_coreBaseSettings.DocSpace)
@ -354,6 +359,11 @@ public class GlobalFolder
return result;
}
public async ValueTask<T> GetFolderArchive<T>(IDaoFactory daoFactory)
{
return (T)Convert.ChangeType(await GetFolderArchive(daoFactory), typeof(T));
}
internal static readonly ConcurrentDictionary<string, Lazy<int>> UserRootFolderCache =
new ConcurrentDictionary<string, Lazy<int>>(); /*Use SYNCHRONIZED for cross thread blocks*/