Base project

This commit is contained in:
2022-03-31 15:35:33 +00:00
parent 389c392899
commit ad5bedf339
35 changed files with 637 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using FileTime.Core.Enums;
using FileTime.Core.Services;
namespace FileTime.Core.Models
{
public class AbsolutePath : IAbsolutePath
{
public IContentProvider ContentProvider { get; }
public IContentProvider? VirtualContentProvider { get; }
public FullName Path { get; }
public AbsolutePathType Type { get; }
public AbsolutePath(IContentProvider contentProvider, FullName path, AbsolutePathType type, IContentProvider? virtualContentProvider = null)
{
ContentProvider = contentProvider;
Path = path;
VirtualContentProvider = virtualContentProvider;
Type = type;
}
}
}

View File

@@ -0,0 +1,8 @@
namespace FileTime.Core.Models
{
public static class Constants
{
public const char SeparatorChar = '/';
public const string ContentProviderProtocol = "ctp://";
}
}

View File

@@ -0,0 +1,17 @@
using FileTime.Core.Enums;
using FileTime.Core.Services;
namespace FileTime.Core.Models
{
public record Container
(string Name,
string DisplayName,
FullName FullName,
NativePath NativePath,
bool IsHidden,
bool IsExists,
SupportsDelete CanDelete,
bool CanRename,
IContentProvider Provider,
IReadOnlyList<IAbsolutePath> Items) : IContainer;
}

View File

@@ -0,0 +1,16 @@
using FileTime.Core.Enums;
using FileTime.Core.Services;
namespace FileTime.Core.Models
{
public record Element
(string Name,
string DisplayName,
FullName FullName,
NativePath NativePath,
bool IsHidden,
bool IsExists,
SupportsDelete CanDelete,
bool CanRename,
IContentProvider Provider) : IElement;
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\FileTime.Core.Abstraction\FileTime.Core.Abstraction.csproj" />
</ItemGroup>
</Project>