File attachment WIP

This commit is contained in:
TheXamlGuy
2024-07-24 21:18:40 +01:00
parent fdb674ab4b
commit cdefa9c371
4 changed files with 19 additions and 5 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ public class FileProvider(ITopLevelProvider topLevelProvider) :
{ {
new(filter.Name) new(filter.Name)
{ {
Patterns = filter.Extensions.Select(x => $"*.{x}").ToList() Patterns = filter.Extensions is { Count: > 0 } ? filter.Extensions.Select(x => $"*.{x}").ToList() : ["*.*"]
} }
} }
}); });
+4
View File
@@ -0,0 +1,4 @@
namespace Toolkit.Foundation;
public record FileDescriptor(string Name, string Path, int Size) :
IFileDescriptor;
+10
View File
@@ -0,0 +1,10 @@
namespace Toolkit.Foundation;
public interface IFileDescriptor
{
string Name { get; }
string Path { get; }
int Size { get; }
}
+3 -3
View File
@@ -2,9 +2,9 @@
public interface IImageDescriptor public interface IImageDescriptor
{ {
public object Image { get; } object Image { get; }
public int Width { get; } int Width { get; }
public int Height { get; } int Height { get; }
} }