mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Replaces MVC with FastEndpoints in Lumina.Presentation.Api
This commit is contained in:
1 parent
b1a20716df
commit
c7b8bc2f1c
519 files changed
+15329
-8539
No files matched your search
+44
@@ -0,0 +1,44 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Enums.FileSystem;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.FileSystemManagement.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Generic file system node.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Path: {Path}")]
|
||||
public class FileSystemTreeNodeResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the full path of the file or directory.
|
||||
/// </summary>
|
||||
public string Path { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the file or directory.
|
||||
/// </summary>
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the item, indicating whether it is a file, directory, or drive.
|
||||
/// </summary>
|
||||
public FileSystemItemType ItemType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the node is expanded.
|
||||
/// </summary>
|
||||
public bool IsExpanded { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the child nodes have been loaded.
|
||||
/// </summary>
|
||||
public bool ChildrenLoaded { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of child nodes.
|
||||
/// </summary>
|
||||
public List<FileSystemTreeNodeResponse> Children { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.FileSystemManagement;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.FileSystemManagement.Directories;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response containing a file system directory.
|
||||
/// </summary>
|
||||
/// <param name="Path">The path of the directory.</param>
|
||||
/// <param name="Name">The name of the directory.</param>
|
||||
/// <param name="DateCreated">The creation date of the directory.</param>
|
||||
/// <param name="DateModified">The modification date of the directory.</param>
|
||||
/// <param name="Items">The children items of the directory.</param>
|
||||
[DebuggerDisplay("Name: {Name} (Directory)")]
|
||||
public record DirectoryResponse(
|
||||
string Path,
|
||||
string Name,
|
||||
DateTime DateCreated,
|
||||
DateTime DateModified,
|
||||
List<FileSystemItemEntity> Items
|
||||
) : FileSystemItemEntity(Path, Name, DateCreated, DateModified);
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Enums.FileSystem;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.FileSystemManagement.FileSystem;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response containing the file system platform type.
|
||||
/// </summary>
|
||||
/// <param name="PlatformType">The returned file system platform type.</param>
|
||||
[DebuggerDisplay("PlatformType: {PlatformType}")]
|
||||
public record FileSystemTypeResponse(
|
||||
PlatformType PlatformType
|
||||
);
|
||||
@@ -0,0 +1,24 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.FileSystemManagement;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.FileSystemManagement.Files;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response containing a file system file.
|
||||
/// </summary>
|
||||
/// <param name="Path">The path of the file.</param>
|
||||
/// <param name="Name">The name of the file.</param>
|
||||
/// <param name="DateCreated">The creation date of the file.</param>
|
||||
/// <param name="DateModified">The modification date of the file.</param>
|
||||
/// <param name="Size">The size of the file, in bytes.</param>
|
||||
[DebuggerDisplay("Name: {Name} (File, Size: {Size} bytes)")]
|
||||
public record FileResponse(
|
||||
string Path,
|
||||
string Name,
|
||||
DateTime DateCreated,
|
||||
DateTime DateModified,
|
||||
long Size
|
||||
) : FileSystemItemEntity(Path, Name, DateCreated, DateModified);
|
||||
@@ -0,0 +1,14 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.FileSystemManagement.Path;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response to the inquiry about the existence of a file system path.
|
||||
/// </summary>
|
||||
/// <param name="Exists">Whether a file system path exists or not.</param>
|
||||
[DebuggerDisplay("Exists: {Exists}")]
|
||||
public record PathExistsResponse(
|
||||
bool Exists
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.FileSystemManagement.Path;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response containing a file system path.
|
||||
/// </summary>
|
||||
/// <param name="Path">The returned path.</param>
|
||||
[DebuggerDisplay("Path: {Path}")]
|
||||
public record PathSegmentResponse(
|
||||
string Path
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.FileSystemManagement.Path;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response to the inquiry about the system's path separator.
|
||||
/// </summary>
|
||||
/// <param name="Separator">The system's path separator.</param>
|
||||
[DebuggerDisplay("Separator: {Separator}")]
|
||||
public record PathSeparatorResponse(
|
||||
string Separator
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.FileSystemManagement.Path;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response to the inquiry about the validity of a file system path.
|
||||
/// </summary>
|
||||
/// <param name="IsValid">Whether a file system path is valid or not.</param>
|
||||
[DebuggerDisplay("IsValid: {IsValid}")]
|
||||
public record PathValidResponse(
|
||||
bool IsValid
|
||||
);
|
||||
@@ -0,0 +1,17 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Enums.PhotoLibrary;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.FileSystemManagement.Thumbnails;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for thumbnails.
|
||||
/// </summary>
|
||||
/// <param name="Type">The type of the thumbnail image.</param>
|
||||
/// <param name="Bytes">The bytes representing the thumbail.</param>
|
||||
[DebuggerDisplay("Type: {Type}")]
|
||||
public record ThumbnailResponse(
|
||||
ImageType Type,
|
||||
byte[] Bytes
|
||||
);
|
||||
Reference in new issue
Block a user