Skip to content

Commit

Permalink
Merge pull request #356 from J-Tech-Japan/355-tenatcommandtenantid-=-…
Browse files Browse the repository at this point in the history
…gettenantid

Change Tenant Command to GetTenantId()
  • Loading branch information
tomohisa authored Aug 17, 2024
2 parents e02d6ea + 778994a commit 3f7e090
Show file tree
Hide file tree
Showing 25 changed files with 45 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ public static async Task<ResultBox<UnitValue>> HandleCommandAsync(
: ExceptionOrNone.None)
.Conveyor(_ => context.AppendEvent(new TenantUserCreated(command.Name, command.Email)));
}
public string GetTenantId() => TenantId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ public IEnumerable<IEventPayloadApplicableTo<ClientPayload>> HandleCommand(Creat
yield return new ClientCreated(command.Name);
}
}
public string GetTenantId() => TenantId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>Sekiban.Aspire.Infrastructure.Cosmos</PackageId>
<Version>0.21.1</Version>
<Version>0.21.2</Version>
<Authors>J-Tech Group</Authors>
<Company>J-Tech-Japan</Company>
<PackageDescription>Sekiban - Event Sourcing Framework Cosmos Aspire Connector</PackageDescription>
<PackageVersion>0.21.1</PackageVersion>
<PackageVersion>0.21.2</PackageVersion>
<Description>Beta Support for F#</Description>
<RepositoryUrl>https://github.com/J-Tech-Japan/Sekiban</RepositoryUrl>
<RootNamespace>Sekiban.Aspire.Infrastructure.Cosmos</RootNamespace>
Expand All @@ -23,8 +23,8 @@

<ItemGroup>
<PackageReference Include="Aspire.Azure.Storage.Blobs" Version="8.1.0" />
<PackageReference Include="Sekiban.Infrastructure.Cosmos" Version="0.21.1"/>
<PackageReference Include="Sekiban.Web" Version="0.21.1"/>
<PackageReference Include="Sekiban.Infrastructure.Cosmos" Version="0.21.2"/>
<PackageReference Include="Sekiban.Web" Version="0.21.2"/>
<ProjectReference Include="..\Sekiban.Infrastructure.Cosmos\Sekiban.Infrastructure.Cosmos.csproj"/>
<ProjectReference Include="..\Sekiban.Web\Sekiban.Web.csproj"/>
<None Include="..\README.md" Pack="true" PackagePath="\"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Sekiban.Core/Command/ITenantCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ namespace Sekiban.Core.Command;
public interface ITenantCommand<TAggregatePayload> : ICommand<TAggregatePayload>, ITenantCommandCommon
where TAggregatePayload : IAggregatePayloadCommon
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
2 changes: 1 addition & 1 deletion src/Sekiban.Core/Command/ITenantCommandCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ namespace Sekiban.Core.Command;

public interface ITenantCommandCommon
{
public string TenantId { get; }
public string GetTenantId();
}
2 changes: 1 addition & 1 deletion src/Sekiban.Core/Command/ITenantCommandWithHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ public interface
ITenantCommandWithHandler<TAggregatePayload, in TCommand> : ICommandWithHandler<TAggregatePayload, TCommand>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon where TCommand : ICommand<TAggregatePayload>
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
2 changes: 1 addition & 1 deletion src/Sekiban.Core/Command/ITenantCommandWithHandlerAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public interface
ICommandWithHandlerAsync<TAggregatePayload, TCommand>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon where TCommand : ICommand<TAggregatePayload>
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public interface
ICommandWithHandlerForExistingAggregate<TAggregatePayload, TCommand>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon where TCommand : ICommand<TAggregatePayload>
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public interface
ICommandWithHandlerForExistingAggregateAsync<TAggregatePayload, TCommand>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon where TCommand : ICommand<TAggregatePayload>
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public interface
ICommandWithHandlerWithVersionValidation<TAggregatePayload, TCommand>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon where TCommand : ICommand<TAggregatePayload>
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public interface
ICommandWithHandlerWithVersionValidationAsync<TAggregatePayload, TCommand>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon where TCommand : ICommand<TAggregatePayload>
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public interface
ICommandWithHandlerWithVersionValidationForExistingAggregate<TAggregatePayload, TCommand>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon where TCommand : ICommand<TAggregatePayload>
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public interface
ICommandWithHandlerWithVersionValidationForExistingAggregateAsync<TAggregatePayload, TCommand>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon where TCommand : ICommand<TAggregatePayload>
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public interface
ICommandWithHandlerWithoutLoadingAggregate<TAggregatePayload, TCommand>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon where TCommand : ICommand<TAggregatePayload>
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public interface
ICommandWithHandlerWithoutLoadingAggregateAsync<TAggregatePayload, TCommand>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon where TCommand : ICommand<TAggregatePayload>
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ public interface
ITenantCommandWithVersionValidation<TAggregatePayload> : ICommandWithVersionValidation<TAggregatePayload>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ public interface
ITenantCommandWithoutLoadingAggregate<TAggregatePayload> : ICommandWithoutLoadingAggregate<TAggregatePayload>,
ITenantCommandCommon where TAggregatePayload : IAggregatePayloadCommon
{
string ICommandCommon.GetRootPartitionKey() => TenantId;
string ICommandCommon.GetRootPartitionKey() => GetTenantId();
}
4 changes: 2 additions & 2 deletions src/Sekiban.Core/Sekiban.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<PackageId>Sekiban.Core</PackageId>
<Version>0.21.1</Version>
<Version>0.21.2</Version>
<Authors>J-Tech Group</Authors>
<Company>J-Tech-Japan</Company>
<PackageDescription>Sekiban - Event Sourcing Framework Core</PackageDescription>
<RepositoryUrl>https://github.com/J-Tech-Japan/Sekiban</RepositoryUrl>
<PackageVersion>0.21.1</PackageVersion>
<PackageVersion>0.21.2</PackageVersion>
<Description>Beta Support for F#</Description>
<AssemblyName>Sekiban.Core</AssemblyName>
<RootNamespace>Sekiban.Core</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>Sekiban.Infrastructure.Aws.S3</PackageId>
<Version>0.21.1</Version>
<Version>0.21.2</Version>
<Authors>J-Tech Group</Authors>
<Company>J-Tech-Japan</Company>
<PackageDescription>Sekiban - Event Sourcing Framework AWS S3 Infrastructure</PackageDescription>
<RepositoryUrl>https://github.com/J-Tech-Japan/Sekiban</RepositoryUrl>
<PackageVersion>0.21.1</PackageVersion>
<PackageVersion>0.21.2</PackageVersion>
<Description>Beta Support for F#</Description>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>preview</LangVersion>
Expand All @@ -20,9 +20,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.S3" Version="3.7.401" />
<PackageReference Include="AWSSDK.S3" Version="3.7.401.1"/>
<PackageReference Include="SharpZipLib" Version="1.4.2"/>
<PackageReference Include="Sekiban.Core" Version="0.21.1"/>
<PackageReference Include="Sekiban.Core" Version="0.21.2"/>
<None Include="..\README.md" Pack="true" PackagePath="\"/>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>Sekiban.Infrastructure.Azure.Storage.Blobs</PackageId>
<Version>0.21.1</Version>
<Version>0.21.2</Version>
<Authors>J-Tech Group</Authors>
<Company>J-Tech-Japan</Company>
<PackageDescription>Sekiban - Event Sourcing Framework Azure Storage Blob</PackageDescription>
<RepositoryUrl>https://github.com/J-Tech-Japan/Sekiban</RepositoryUrl>
<PackageVersion>0.21.1</PackageVersion>
<PackageVersion>0.21.2</PackageVersion>
<Description>Beta Support for F#</Description>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>preview</LangVersion>
Expand All @@ -24,7 +24,7 @@
<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\"/>
<PackageReference Include="Azure.Storage.Blobs" Version="12.21.2" />
<PackageReference Include="Sekiban.Core" Version="0.21.1"/>
<PackageReference Include="Sekiban.Core" Version="0.21.2"/>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>Sekiban.Infrastructure.Cosmos</PackageId>
<Version>0.21.1</Version>
<Version>0.21.2</Version>
<Authors>J-Tech Group</Authors>
<Company>J-Tech-Japan</Company>
<PackageDescription>Sekiban - Event Sourcing Framework CosmosInfrastructure</PackageDescription>
<RepositoryUrl>https://github.com/J-Tech-Japan/Sekiban</RepositoryUrl>
<PackageVersion>0.21.1</PackageVersion>
<PackageVersion>0.21.2</PackageVersion>
<Description>Beta Support for F#</Description>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>preview</LangVersion>
Expand All @@ -24,8 +24,8 @@
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.42.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0"/>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Sekiban.Core" Version="0.21.1"/>
<PackageReference Include="Sekiban.Infrastructure.Azure.Storage.Blobs" Version="0.21.1"/>
<PackageReference Include="Sekiban.Core" Version="0.21.2"/>
<PackageReference Include="Sekiban.Infrastructure.Azure.Storage.Blobs" Version="0.21.2"/>
<None Include="..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>Sekiban.Infrastructure.Dynamo</PackageId>
<Version>0.21.1</Version>
<Version>0.21.2</Version>
<Authors>J-Tech Group</Authors>
<Company>J-Tech-Japan</Company>
<PackageDescription>Sekiban - Event Sourcing Framework Dynamo Infrastructure</PackageDescription>
<RepositoryUrl>https://github.com/J-Tech-Japan/Sekiban</RepositoryUrl>
<PackageVersion>0.21.1</PackageVersion>
<PackageVersion>0.21.2</PackageVersion>
<Description>Beta Support for F#</Description>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>preview</LangVersion>
Expand All @@ -20,9 +20,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.DynamoDBv2" Version="3.7.400.6" />
<PackageReference Include="Sekiban.Core" Version="0.21.1"/>
<PackageReference Include="Sekiban.Infrastructure.Aws.S3" Version="0.21.1"/>
<PackageReference Include="AWSSDK.DynamoDBv2" Version="3.7.400.7"/>
<PackageReference Include="Sekiban.Core" Version="0.21.2"/>
<PackageReference Include="Sekiban.Infrastructure.Aws.S3" Version="0.21.2"/>
<None Include="..\README.md" Pack="true" PackagePath="\"/>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<Nullable>enable</Nullable>
<TargetFramework>net8.0</TargetFramework>
<PackageId>Sekiban.Infrastructure.Postgres</PackageId>
<Version>0.21.1</Version>
<Version>0.21.2</Version>
<Authors>J-Tech Group</Authors>
<Company>J-Tech-Japan</Company>
<PackageDescription>Sekiban - Event Sourcing Framework Dynamo Infrastructure</PackageDescription>
<RepositoryUrl>https://github.com/J-Tech-Japan/Sekiban</RepositoryUrl>
<PackageVersion>0.21.1</PackageVersion>
<PackageVersion>0.21.2</PackageVersion>
<Description>Beta Support for F#</Description>
<LangVersion>preview</LangVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
6 changes: 3 additions & 3 deletions src/Sekiban.Testing/Sekiban.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<PackageId>Sekiban.Testing</PackageId>
<Version>0.21.1</Version>
<Version>0.21.2</Version>
<Authors>J-Tech Group</Authors>
<Company>J-Tech-Japan</Company>
<PackageDescription>Sekiban - Event Sourcing Framework Testing</PackageDescription>
<RepositoryUrl>https://github.com/J-Tech-Japan/Sekiban</RepositoryUrl>
<PackageVersion>0.21.1</PackageVersion>
<PackageVersion>0.21.2</PackageVersion>
<Description>Beta Support for F#</Description>
<AssemblyName>Sekiban.Testing</AssemblyName>
<RootNamespace>Sekiban.Testing</RootNamespace>
Expand All @@ -24,7 +24,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0"/>
<PackageReference Include="xunit.assert" Version="2.9.0" />
<PackageReference Include="xunit.extensibility.core" Version="2.9.0" />
<PackageReference Include="Sekiban.Core" Version="0.21.1"/>
<PackageReference Include="Sekiban.Core" Version="0.21.2"/>
<None Include="..\README.md" Pack="true" PackagePath="\"/>
<PackageReference Include="xunit.extensibility.execution" Version="2.9.0" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Sekiban.Web/Sekiban.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>Library</OutputType>
<PackageId>Sekiban.Web</PackageId>
<Version>0.21.1</Version>
<Version>0.21.2</Version>
<Authors>J-Tech Group</Authors>
<Company>J-Tech-Japan</Company>
<PackageDescription>Sekiban - Event Sourcing Framework WebHelper</PackageDescription>
<RepositoryUrl>https://github.com/J-Tech-Japan/Sekiban</RepositoryUrl>
<PackageVersion>0.21.1</PackageVersion>
<PackageVersion>0.21.2</PackageVersion>
<Description>Beta Support for F#</Description>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>preview</LangVersion>
Expand Down

0 comments on commit 3f7e090

Please sign in to comment.