Add editorconfig and analyzers, format backend code
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
namespace Musify.Application.Shared
|
||||
{
|
||||
public record ImageSize(
|
||||
string SavePath,
|
||||
int Width,
|
||||
int Height);
|
||||
}
|
||||
namespace Musify.Application.Shared;
|
||||
|
||||
public record ImageSize(
|
||||
string SavePath,
|
||||
int Width,
|
||||
int Height);
|
||||
|
||||
@@ -1,26 +1,25 @@
|
||||
using X.PagedList;
|
||||
|
||||
namespace Musify.Application.Shared
|
||||
namespace Musify.Application.Shared;
|
||||
|
||||
public record PaginatedResponse<T>(
|
||||
IReadOnlyCollection<T> Items,
|
||||
int PageNumber,
|
||||
int PageSize,
|
||||
int PageCount,
|
||||
int TotalItemCount,
|
||||
bool HasNextPage,
|
||||
bool HasPreviousPage)
|
||||
{
|
||||
public record PaginatedResponse<T>(
|
||||
IReadOnlyCollection<T> Items,
|
||||
int PageNumber,
|
||||
int PageSize,
|
||||
int PageCount,
|
||||
int TotalItemCount,
|
||||
bool HasNextPage,
|
||||
bool HasPreviousPage)
|
||||
public static PaginatedResponse<T> FromPagedList(IPagedList<T> pagedList)
|
||||
{
|
||||
public static PaginatedResponse<T> FromPagedList(IPagedList<T> pagedList)
|
||||
{
|
||||
return new PaginatedResponse<T>(
|
||||
pagedList.ToArray(),
|
||||
pagedList.PageNumber,
|
||||
pagedList.PageSize,
|
||||
pagedList.PageCount,
|
||||
pagedList.TotalItemCount,
|
||||
pagedList.HasNextPage,
|
||||
pagedList.HasPreviousPage);
|
||||
}
|
||||
return new PaginatedResponse<T>(
|
||||
pagedList.ToArray(),
|
||||
pagedList.PageNumber,
|
||||
pagedList.PageSize,
|
||||
pagedList.PageCount,
|
||||
pagedList.TotalItemCount,
|
||||
pagedList.HasNextPage,
|
||||
pagedList.HasPreviousPage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
namespace Musify.Application.Shared
|
||||
namespace Musify.Application.Shared;
|
||||
|
||||
public static class StorageKey
|
||||
{
|
||||
public static class StorageKey
|
||||
public static string Combine(params string[] segments)
|
||||
{
|
||||
public static string Combine(params string[] segments)
|
||||
{
|
||||
return string.Join('/', segments
|
||||
.Where(static s => !string.IsNullOrWhiteSpace(s))
|
||||
.Select(static s => s.Trim().Trim('/', '\\')));
|
||||
}
|
||||
return string.Join('/', segments
|
||||
.Where(static s => !string.IsNullOrWhiteSpace(s))
|
||||
.Select(static s => s.Trim().Trim('/', '\\')));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user