mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 10:11:10 +00:00
Renames Model to Dto
This commit is contained in:
1 parent
76b9596a27
commit
3aa9702411
32 files changed
+179
-139
No files matched your search
+3
-3
@@ -2,13 +2,13 @@
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.Infrastructure.Models.Configuration;
|
||||
namespace Lumina.Application.Common.Infrastructure.Models.DTO.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// Model for deserializing media settings.
|
||||
/// Data transfer object for deserializing media settings.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{SECTION_NAME}")]
|
||||
public class MediaSettingsModel
|
||||
public class MediaSettingsDto
|
||||
{
|
||||
public const string SECTION_NAME = "MediaSettings";
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.Infrastructure.Models.DTO.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for deserializing plugins settings.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{SECTION_NAME}")]
|
||||
public class PluginsSettingsDto
|
||||
{
|
||||
public const string SECTION_NAME = "PluginsSettings";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the directory where the plugin assemblies are located.
|
||||
/// </summary>
|
||||
public required string Directory { get; init; }
|
||||
}
|
||||
+4
-4
@@ -1,16 +1,16 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.Common.Enums.FileSystem;
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.FileSystem;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.Infrastructure.Models.FileSystem;
|
||||
namespace Lumina.Application.Common.Infrastructure.Models.DTO.FileSystem;
|
||||
|
||||
/// <summary>
|
||||
/// Generic file system node.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Path: {Path}")]
|
||||
public class FileSystemTreeNode
|
||||
public class FileSystemTreeNodeDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the full path of the file or directory.
|
||||
@@ -30,5 +30,5 @@ public class FileSystemTreeNode
|
||||
/// <summary>
|
||||
/// Gets or sets the list of child nodes.
|
||||
/// </summary>
|
||||
public List<FileSystemTreeNode> Children { get; set; } = [];
|
||||
public List<FileSystemTreeNodeDto> Children { get; set; } = [];
|
||||
}
|
||||
+6
-6
@@ -4,14 +4,14 @@ using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.Infrastructure.Models.MediaLibraryScanJobPayloads;
|
||||
namespace Lumina.Application.Common.Infrastructure.Models.DTO.MediaLibraryScanJobPayloads;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an item for the payload of the file hashing media library scan job.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Path = {Path}, CurrentHash = {CurrentHash}, OldHash = {OldHash}, Ticks = {Ticks}, Size = {Size}")]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct HashedFileSystemFile : IEquatable<HashedFileSystemFile>
|
||||
public struct HashedFileSystemFileDto : IEquatable<HashedFileSystemFileDto>
|
||||
{
|
||||
/// <summary>
|
||||
/// The path of the file system file.
|
||||
@@ -39,7 +39,7 @@ public struct HashedFileSystemFile : IEquatable<HashedFileSystemFile>
|
||||
public long Ticks { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public readonly bool Equals(HashedFileSystemFile other)
|
||||
public readonly bool Equals(HashedFileSystemFileDto other)
|
||||
{
|
||||
return Size == other.Size && CurrentHash == other.CurrentHash && OldHash == other.OldHash && Ticks == other.Ticks && Path == other.Path;
|
||||
}
|
||||
@@ -47,17 +47,17 @@ public struct HashedFileSystemFile : IEquatable<HashedFileSystemFile>
|
||||
/// <inheritdoc/>
|
||||
public override readonly bool Equals(object? obj)
|
||||
{
|
||||
return obj is HashedFileSystemFile item && Equals(item);
|
||||
return obj is HashedFileSystemFileDto item && Equals(item);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public static bool operator ==(HashedFileSystemFile left, HashedFileSystemFile right)
|
||||
public static bool operator ==(HashedFileSystemFileDto left, HashedFileSystemFileDto right)
|
||||
{
|
||||
return left.Equals(right);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public static bool operator !=(HashedFileSystemFile left, HashedFileSystemFile right)
|
||||
public static bool operator !=(HashedFileSystemFileDto left, HashedFileSystemFileDto right)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Common.Infrastructure.Models.MediaLibraryScanJobPayloads;
|
||||
using Lumina.Application.Common.Infrastructure.Models.DTO.MediaLibraryScanJobPayloads;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
@@ -20,5 +20,5 @@ public interface IFileHashService
|
||||
/// <param name="callback">Callback to invoke during processing of elements.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>A collection of the hashed files, along with their hashes.</returns>
|
||||
Task<List<HashedFileSystemFile>> HashFilesAsync(IReadOnlyCollection<HashedFileSystemFile> files, Func<Task> callback, CancellationToken cancellationToken);
|
||||
Task<List<HashedFileSystemFileDto>> HashFilesAsync(IReadOnlyCollection<HashedFileSystemFileDto> files, Func<Task> callback, CancellationToken cancellationToken);
|
||||
}
|
||||
Reference in new issue
Block a user