Enhance code readability and maintainability by refactoring various components. Update formatting commands in CLAUDE.md for csharpier integration. Simplify method signatures in SegmentFiles, UploadLimits, and multiple endpoint classes for improved clarity. Adjust query handlers and command handlers to streamline parameter handling and enhance consistency across the application.
This commit is contained in:
@@ -33,7 +33,12 @@ public class Genre
|
||||
|
||||
private Genre() { }
|
||||
|
||||
public static Genre Create(string name, string slug, int sortOrder = 0, bool isSystem = false) =>
|
||||
public static Genre Create(
|
||||
string name,
|
||||
string slug,
|
||||
int sortOrder = 0,
|
||||
bool isSystem = false
|
||||
) =>
|
||||
new()
|
||||
{
|
||||
Id = Guid.NewGuid(),
|
||||
|
||||
@@ -36,7 +36,10 @@ public class GenreAlias
|
||||
var trimmed = value.Trim().ToLowerInvariant();
|
||||
return string.Join(
|
||||
' ',
|
||||
trimmed.Split(' ', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries)
|
||||
trimmed.Split(
|
||||
' ',
|
||||
StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@ public class Show
|
||||
if (ids.Count == 0)
|
||||
return;
|
||||
|
||||
var primary = primaryGenreId is { } candidate && ids.Contains(candidate) ? candidate : ids[0];
|
||||
var primary =
|
||||
primaryGenreId is { } candidate && ids.Contains(candidate) ? candidate : ids[0];
|
||||
foreach (var id in ids)
|
||||
_genres.Add(ShowGenre.Create(Id, id, id == primary));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user