Initial split migration
This commit is contained in:
7
Pushy.Domain/ILinkGenerator.cs
Normal file
7
Pushy.Domain/ILinkGenerator.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Pushy.Domain;
|
||||
|
||||
public interface ILinkGenerator : IGrainWithGuidKey
|
||||
{
|
||||
[Alias("GenerateLink")]
|
||||
public ValueTask<LinkResult> GenerateTextShare([Immutable] string text);
|
||||
}
|
||||
14
Pushy.Domain/ITextItem.cs
Normal file
14
Pushy.Domain/ITextItem.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Orleans.Concurrency;
|
||||
|
||||
namespace Pushy.Domain;
|
||||
|
||||
public interface ITextItem : IGrainWithStringKey
|
||||
{
|
||||
[Alias("SetText")]
|
||||
public ValueTask<TextSetResult> SetText(string text);
|
||||
|
||||
[ReadOnly]
|
||||
[return: Immutable]
|
||||
[Alias("GetText")]
|
||||
ValueTask<string> GetText();
|
||||
}
|
||||
6
Pushy.Domain/LinkResult.cs
Normal file
6
Pushy.Domain/LinkResult.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Pushy.Domain;
|
||||
|
||||
[Immutable]
|
||||
[GenerateSerializer]
|
||||
[Alias("Pushy.Grains.LinkResult")]
|
||||
public record LinkResult(ITextItem? Item);
|
||||
13
Pushy.Domain/Pushy.Domain.csproj
Normal file
13
Pushy.Domain/Pushy.Domain.csproj
Normal file
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Orleans.Sdk" Version="9.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
6
Pushy.Domain/TextItem.cs
Normal file
6
Pushy.Domain/TextItem.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Pushy.Domain;
|
||||
|
||||
public sealed class TextItem
|
||||
{
|
||||
public string? Text { get; set; }
|
||||
}
|
||||
8
Pushy.Domain/TextSetResult.cs
Normal file
8
Pushy.Domain/TextSetResult.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Pushy.Domain;
|
||||
|
||||
[GenerateSerializer]
|
||||
public enum TextSetResult
|
||||
{
|
||||
Failure,
|
||||
Success
|
||||
}
|
||||
Reference in New Issue
Block a user