Skip to content

Commit

Permalink
Consolidate on Orleans 8.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Jun 14, 2024
1 parent 87e10d8 commit 5a77675
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/CloudActors.Orleans/CloudActors.Orleans.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<PropertyGroup>
<AssemblyName>Devlooped.CloudActors.Orleans</AssemblyName>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NuGetizer" Version="1.2.2" />
<PackageReference Include="Microsoft.Orleans.Server" Version="7.2.6" />
<PackageReference Include="Microsoft.Orleans.Server" Version="8.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/CloudActors.Package/CloudActors.Package.msbuildproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageTags>dotnet orleans actor</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NuGetizer" Version="1.2.0" />
<PackageReference Include="NuGetizer" Version="1.2.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CloudActors.CodeAnaysis\CloudActors.CodeAnaysis.csproj" />
Expand Down
3 changes: 1 addition & 2 deletions src/CloudActors.Streamstone/CloudActors.Streamstone.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@

<ItemGroup>
<PackageReference Include="Devlooped.CloudStorageAccount" Version="1.2.0" />
<PackageReference Include="Microsoft.Orleans.Runtime" Version="7.2.6" />
<PackageReference Include="Microsoft.Orleans.Runtime" Version="8.1.0" />
<PackageReference Include="NuGetizer" Version="1.2.2" />
<PackageReference Include="Streamstone" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CloudActors.Package\CloudActors.Package.msbuildproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\CloudActors.Streamstone.CodeAnalysis\CloudActors.Streamstone.CodeAnalysis.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\CloudActors\CloudActors.csproj" Pack="false" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Extensions.Options;
using Orleans.Providers;
using Orleans.Runtime;
using Orleans.Runtime.Hosting;
using Orleans.Storage;

namespace Orleans.Hosting;
Expand Down Expand Up @@ -49,12 +50,7 @@ public static ISiloBuilder AddStreamstoneActorStorage(this ISiloBuilder builder,
if (configure is not null)
services.AddOptions<StreamstoneOptions>(name).Configure(configure);

if (string.Equals(name, ProviderConstants.DEFAULT_STORAGE_PROVIDER_NAME, StringComparison.Ordinal))
{
services.TryAddSingleton(sp => sp.GetServiceByName<IGrainStorage>(ProviderConstants.DEFAULT_STORAGE_PROVIDER_NAME));
}

return services.AddSingletonNamedService<IGrainStorage>(name, (sp, name) =>
return services.AddGrainStorage(name, (sp, name) =>
{
var snapshot = sp.GetRequiredService<IOptionsMonitor<StreamstoneOptions>>();
return new StreamstoneStorage(sp.GetRequiredService<CloudStorageAccount>(), snapshot.Get(name));
Expand Down
1 change: 0 additions & 1 deletion src/CloudActors/CloudActors.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<ItemGroup>
<PackageReference Include="NuGetizer" Version="1.2.2" />
<PackageReference Include="Microsoft.Orleans.Serialization.Abstractions" Version="8.1.0" />
<PackageReference Include="PolySharp" PrivateAssets="All" Version="1.14.1" />
</ItemGroup>

Expand Down
5 changes: 0 additions & 5 deletions src/Tests/OrleansTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ class MemoryStorage : IGrainStorage
{
ConcurrentDictionary<GrainId, object> memory = new();

public MemoryStorage()
{

}

public Task ClearStateAsync<T>(string stateName, GrainId grainId, IGrainState<T> grainState)
=> memory.TryRemove(grainId, out _) ? Task.CompletedTask : Task.CompletedTask;

Expand Down
5 changes: 2 additions & 3 deletions src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -13,8 +13,7 @@
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2" />
<PackageReference Include="Microsoft.Orleans.Client" Version="8.1.0" />
<PackageReference Include="Microsoft.Orleans.Server" Version="7.2.6" />
<PackageReference Include="Microsoft.Orleans.Server" Version="8.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 5a77675

Please sign in to comment.