Add thread safety and comments re threading
This commit is contained in:
parent
ef3c71a939
commit
b36e110b49
4 changed files with 45 additions and 15 deletions
|
|
@ -33,6 +33,10 @@ namespace LibationUiBase.GridView
|
|||
LoadCover();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates <see cref="LibraryBookEntry{TStatus}"/> for all non-episode books in an enumeration of <see cref="LibraryBook"/>.
|
||||
/// </summary>
|
||||
/// <remarks>Can be called from any thread, but requires the calling thread's <see cref="SynchronizationContext.Current"/> to be valid.</remarks>
|
||||
public static async Task<List<IGridEntry>> GetAllProductsAsync(IEnumerable<LibraryBook> libraryBooks)
|
||||
{
|
||||
var products = libraryBooks.Where(lb => lb.Book.IsProduct()).ToArray();
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@ namespace LibationUiBase.GridView
|
|||
LoadCover();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates <see cref="SeriesEntry{TStatus}"/> for all episodic series in an enumeration of <see cref="LibraryBook"/>.
|
||||
/// </summary>
|
||||
/// <remarks>Can be called from any thread, but requires the calling thread's <see cref="SynchronizationContext.Current"/> to be valid.</remarks>
|
||||
public static async Task<List<ISeriesEntry>> GetAllSeriesEntriesAsync(IEnumerable<LibraryBook> libraryBooks)
|
||||
{
|
||||
var seriesBooks = libraryBooks.Where(lb => lb.Book.IsEpisodeParent()).ToArray();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue