Adds first interface definitions for files and tags

This commit is contained in:
Serraniel 2023-07-27 17:47:21 +02:00
parent 00b30b2349
commit 150f4d7ebe
Signed by: Serraniel
GPG key ID: 3690B4E7364525D3
9 changed files with 58 additions and 10 deletions

View file

@ -7,11 +7,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tagashi File Hub", "src\Tag
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TagashiFileHub.Core", "src\TagashiFileHub.Core\TagashiFileHub.Core.csproj", "{39536C05-9C87-44CA-A753-6A317F252666}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagashiFIleHub.Service", "src\TagashiFIleHub.Service\TagashiFIleHub.Service.csproj", "{368C0084-EBB4-4A9A-9E01-84C48CF184D9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TagashiFIleHub.Service", "src\TagashiFIleHub.Service\TagashiFIleHub.Service.csproj", "{368C0084-EBB4-4A9A-9E01-84C48CF184D9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagashiFileHub.Communication.Abstractions", "src\TagashiFileHub.Communication.Abstractions\TagashiFileHub.Communication.Abstractions.csproj", "{587B3D46-1114-4A84-8F33-4EEA501AE613}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TagashiFileHub.Communication.Abstractions", "src\TagashiFileHub.Communication.Abstractions\TagashiFileHub.Communication.Abstractions.csproj", "{587B3D46-1114-4A84-8F33-4EEA501AE613}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagashiFileHub.Communication.IPC", "src\TagashiFileHub.Communication.IPC\TagashiFileHub.Communication.IPC.csproj", "{64A274BB-678E-42C5-BD69-6BF7F04AD026}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TagashiFileHub.Communication.IPC", "src\TagashiFileHub.Communication.IPC\TagashiFileHub.Communication.IPC.csproj", "{64A274BB-678E-42C5-BD69-6BF7F04AD026}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagashiFileHub.Core.Abstractions", "src\TagashiFileHub.Core.Abstractions\TagashiFileHub.Core.Abstractions.csproj", "{ADF7B751-178A-4ED7-8DEC-CF3FE723A708}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -39,6 +41,10 @@ Global
{64A274BB-678E-42C5-BD69-6BF7F04AD026}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64A274BB-678E-42C5-BD69-6BF7F04AD026}.Release|Any CPU.ActiveCfg = Release|Any CPU
{64A274BB-678E-42C5-BD69-6BF7F04AD026}.Release|Any CPU.Build.0 = Release|Any CPU
{ADF7B751-178A-4ED7-8DEC-CF3FE723A708}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ADF7B751-178A-4ED7-8DEC-CF3FE723A708}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADF7B751-178A-4ED7-8DEC-CF3FE723A708}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ADF7B751-178A-4ED7-8DEC-CF3FE723A708}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -15,5 +15,6 @@
<ItemGroup>
<ProjectReference Include="..\TagashiFileHub.Communication.IPC\TagashiFileHub.Communication.IPC.csproj" />
<ProjectReference Include="..\TagashiFileHub.Core\TagashiFileHub.Core.csproj" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,9 @@
namespace TagashiFileHub.Core.Abstractions.Files;
public interface IFile : IUnique<string>
{
public FileInfo TrueFile();
public IAsyncEnumerable<ITag> GetTagsAsync();
public ITag? AddTag(ITag tag);
public ITag? AddTag(string tagName);
}

View file

@ -0,0 +1,6 @@
namespace TagashiFileHub.Core.Abstractions.Files;
public interface ITag : IUnique<string>
{
string Name { get; set; }
}

View file

@ -0,0 +1,6 @@
namespace TagashiFileHub.Core.Abstractions;
public interface IUnique<T>
{
T Id { get; set; }
}

View file

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View file

@ -1,7 +0,0 @@
namespace TagashiFileHub.Core
{
public class Class1
{
}
}

View file

@ -6,4 +6,9 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\TagashiFileHub.Communication.Abstractions\TagashiFileHub.Communication.Abstractions.csproj" />
<ProjectReference Include="..\TagashiFileHub.Core.Abstractions\TagashiFileHub.Core.Abstractions.csproj" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,13 @@
using TagashiFileHub.Core.Abstractions;
namespace TagashiFileHub.Core;
public class UniqueObject : IUnique<string>
{
public string Id { get; set; }
protected string CreateNewId()
{
return new Guid().ToString();
}
}