mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 13:11:10 +00:00
Standardizes boolean naming across the stack
This commit is contained in:
1 parent
6bd0cf6d42
commit
37dff6039d
78 files changed
+252
-252
No files matched your search
+2
-2
@@ -9,9 +9,9 @@ namespace Lumina.Application.Core.FileSystemManagement.Directories.Queries.GetDi
|
||||
/// Query for retrieving the list of directories at a path.
|
||||
/// </summary>
|
||||
/// <param name="Path">The path for which to retrieve the list of directories.</param>
|
||||
/// <param name="IncludeHiddenElements">Whether to include hidden directories or not.</param>
|
||||
/// <param name="ShouldIncludeHiddenElements">Whether to include hidden directories or not.</param>
|
||||
[DebuggerDisplay("Path: {Path}")]
|
||||
public record GetDirectoriesQuery(
|
||||
string? Path,
|
||||
bool IncludeHiddenElements
|
||||
bool ShouldIncludeHiddenElements
|
||||
) : IQuery;
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class GetDirectoriesQueryHandler : IQueryHandler<GetDirectoriesQuery, Res
|
||||
if (validationResult.Count > 0)
|
||||
return Task.FromResult<Result<IEnumerable<DirectoryResponse>>>(validationResult);
|
||||
|
||||
Result<IEnumerable<Directory>> getSubdirectoriesResult = _directoryService.GetSubdirectories(query.Path!, query.IncludeHiddenElements);
|
||||
Result<IEnumerable<Directory>> getSubdirectoriesResult = _directoryService.GetSubdirectories(query.Path!, query.ShouldIncludeHiddenElements);
|
||||
return Task.FromResult(getSubdirectoriesResult.Match(values => Result.From(values.ToResponses()), errors => errors));
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -9,9 +9,9 @@ namespace Lumina.Application.Core.FileSystemManagement.Files.Queries.GetFiles;
|
||||
/// Query for retrieving the list of files at a path.
|
||||
/// </summary>
|
||||
/// <param name="Path">The path for which to retrieve the list of files.</param>
|
||||
/// <param name="IncludeHiddenElements">Whether to include hidden files and directories or not.</param>
|
||||
/// <param name="ShouldIncludeHiddenElements">Whether to include hidden files and directories or not.</param>
|
||||
[DebuggerDisplay("Path: {Path}")]
|
||||
public record GetFilesQuery(
|
||||
string? Path,
|
||||
bool IncludeHiddenElements
|
||||
bool ShouldIncludeHiddenElements
|
||||
) : IQuery;
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class GetFilesQueryHandler : IQueryHandler<GetFilesQuery, Result<IEnumera
|
||||
if (validationResult.Count > 0)
|
||||
return Task.FromResult<Result<IEnumerable<FileResponse>>>(validationResult);
|
||||
|
||||
Result<IEnumerable<File>> getFilesResult = _fileService.GetFiles(query.Path!, query.IncludeHiddenElements);
|
||||
Result<IEnumerable<File>> getFilesResult = _fileService.GetFiles(query.Path!, query.ShouldIncludeHiddenElements);
|
||||
return Task.FromResult(getFilesResult.Match(values => Result.From(values.ToResponses()), errors => errors));
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -9,9 +9,9 @@ namespace Lumina.Application.Core.FileSystemManagement.Files.Queries.GetTreeFile
|
||||
/// Query for retrieving the list of files at a path.
|
||||
/// </summary>
|
||||
/// <param name="Path">The path for which to retrieve the list of files.</param>
|
||||
/// <param name="IncludeHiddenElements">Whether to include hidden files and directories or not.</param>
|
||||
/// <param name="ShouldIncludeHiddenElements">Whether to include hidden files and directories or not.</param>
|
||||
[DebuggerDisplay("Path: {Path}")]
|
||||
public record GetTreeFilesQuery(
|
||||
string? Path,
|
||||
bool IncludeHiddenElements
|
||||
bool ShouldIncludeHiddenElements
|
||||
) : IQuery;
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class GetTreeFilesQueryHandler : IQueryHandler<GetTreeFilesQuery, Result<
|
||||
if (validationResult.Count > 0)
|
||||
return Task.FromResult<Result<IEnumerable<FileSystemTreeNodeResponse>>>(validationResult);
|
||||
|
||||
Result<IEnumerable<File>> getFilesResult = _fileService.GetFiles(query.Path!, query.IncludeHiddenElements);
|
||||
Result<IEnumerable<File>> getFilesResult = _fileService.GetFiles(query.Path!, query.ShouldIncludeHiddenElements);
|
||||
return Task.FromResult(getFilesResult.Match(values => Result.From(values.ToFileSystemTreeNodeResponses()), errors => errors));
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -9,9 +9,9 @@ namespace Lumina.Application.Core.FileSystemManagement.Paths.Queries.CheckPathEx
|
||||
/// Query for checking the existence of a file system path.
|
||||
/// </summary>
|
||||
/// <param name="Path">The path for which to check the existence of.</param>
|
||||
/// <param name="IncludeHiddenElements">Whether to include hidden file system elements or not.</param>
|
||||
[DebuggerDisplay("Path: {Path}, IncludeHiddenElements: {IncludeHiddenElements}")]
|
||||
/// <param name="ShouldIncludeHiddenElements">Whether to include hidden file system elements or not.</param>
|
||||
[DebuggerDisplay("Path: {Path}, ShouldIncludeHiddenElements: {ShouldIncludeHiddenElements}")]
|
||||
public record CheckPathExistsQuery(
|
||||
string? Path,
|
||||
bool IncludeHiddenElements
|
||||
bool ShouldIncludeHiddenElements
|
||||
) : IQuery;
|
||||
+1
-1
@@ -44,6 +44,6 @@ public class CheckPathExistsQueryHandler : IQueryHandler<CheckPathExistsQuery, R
|
||||
if (validationResult.Count > 0)
|
||||
return Task.FromResult<Result<PathExistsResponse>>(validationResult);
|
||||
|
||||
return Task.FromResult(Result.From(new PathExistsResponse(_pathService.Exists(query.Path!, query.IncludeHiddenElements))));
|
||||
return Task.FromResult(Result.From(new PathExistsResponse(_pathService.Exists(query.Path!, query.ShouldIncludeHiddenElements))));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user