mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 17:11:10 +00:00
Adds unlit color to hidden file system browser dialog elements.
This commit is contained in:
1 parent
3f7cc2c60f
commit
b46dce745b
58 files changed
+855
-360
No files matched your search
+4
-1
@@ -28,6 +28,7 @@ public class DirectoryFixture
|
||||
/// <param name="dateCreated">Optional. The directory's creation date. If not provided, a random past date is generated.</param>
|
||||
/// <param name="dateModified">Optional. The directory's modification date. If not provided, a recent date is generated.</param>
|
||||
/// <param name="status">Optional. The directory's status. If not provided, a random status is assigned.</param>
|
||||
/// <param name="isHidden">Optional. Whether the directory is hidden. If not provided, a random value is generated.</param>
|
||||
/// <param name="childItems">Optional. A list of child items to be added to the directory.</param>
|
||||
/// <returns>A newly created <see cref="Directory"/> instance.</returns>
|
||||
/// <exception cref="InvalidOperationException">Thrown if the <see cref="Directory"/> creation fails.</exception>
|
||||
@@ -37,6 +38,7 @@ public class DirectoryFixture
|
||||
Optional<DateTime>? dateCreated = null,
|
||||
Optional<DateTime>? dateModified = null,
|
||||
FileSystemItemStatus? status = null,
|
||||
bool? isHidden = null,
|
||||
List<FileSystemItem>? childItems = null)
|
||||
{
|
||||
path ??= _faker.System.FilePath();
|
||||
@@ -44,8 +46,9 @@ public class DirectoryFixture
|
||||
dateCreated ??= Optional<DateTime>.Some(_faker.Date.Past());
|
||||
dateModified ??= Optional<DateTime>.Some(_faker.Date.Recent());
|
||||
status ??= _faker.PickRandom<FileSystemItemStatus>();
|
||||
isHidden ??= _faker.Random.Bool();
|
||||
|
||||
Result<Directory> directoryResult = Directory.Create(path, name, dateCreated.Value, dateModified.Value, status.Value);
|
||||
Result<Directory> directoryResult = Directory.Create(path, name, dateCreated.Value, dateModified.Value, status.Value, isHidden.Value);
|
||||
|
||||
if (directoryResult.IsFailure)
|
||||
throw new InvalidOperationException("Failed to create Directory: " + string.Join(", ", directoryResult.Errors));
|
||||
|
||||
+4
-1
@@ -28,6 +28,7 @@ public class FileFixture
|
||||
/// <param name="dateModified">Optional. The file's modification date. If not provided, a recent date is generated.</param>
|
||||
/// <param name="size">Optional. The file size. If not provided, a random size is generated.</param>
|
||||
/// <param name="status">Optional. The file's status. If not provided, a random status is assigned.</param>
|
||||
/// <param name="isHidden">Optional. Whether the file is hidden. If not provided, a random value is generated.</param>
|
||||
/// <param name="includeDates">Whether the creation and modification dates should be included, or left unset.</param>
|
||||
/// <returns>The created <see cref="File"/>.</returns>
|
||||
public File Create(
|
||||
@@ -37,6 +38,7 @@ public class FileFixture
|
||||
Optional<DateTime>? dateModified = null,
|
||||
long? size = null,
|
||||
FileSystemItemStatus? status = null,
|
||||
bool? isHidden = null,
|
||||
bool includeDates = true)
|
||||
{
|
||||
path ??= _faker.System.FilePath();
|
||||
@@ -45,8 +47,9 @@ public class FileFixture
|
||||
dateModified ??= includeDates ? Optional<DateTime>.Some(_faker.Date.Recent()) : Optional<DateTime>.None();
|
||||
size ??= _faker.Random.Long();
|
||||
status ??= _faker.PickRandom<FileSystemItemStatus>();
|
||||
isHidden ??= _faker.Random.Bool();
|
||||
|
||||
Result<File> fileResult = File.Create(path, name, dateCreated.Value, dateModified.Value, size.Value, status.Value);
|
||||
Result<File> fileResult = File.Create(path, name, dateCreated.Value, dateModified.Value, size.Value, status.Value, isHidden.Value);
|
||||
|
||||
if (fileResult.IsFailure)
|
||||
throw new InvalidOperationException("Failed to create File: " + string.Join(", ", fileResult.Errors));
|
||||
|
||||
Reference in new issue
Block a user