diff --git a/Directory.Build.props b/Directory.Build.props
index b75e2d96..ce092910 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -15,6 +15,6 @@
- 8.0.0
+ 8.2.0
diff --git a/OrleansDashboard/Implementation/Grains/DashboardGrain.cs b/OrleansDashboard/Implementation/Grains/DashboardGrain.cs
index 1dca06e8..9fc99ed4 100644
--- a/OrleansDashboard/Implementation/Grains/DashboardGrain.cs
+++ b/OrleansDashboard/Implementation/Grains/DashboardGrain.cs
@@ -63,7 +63,7 @@ public override Task OnActivateAsync(CancellationToken cancellationToken)
{
var interval = TimeSpan.FromMinutes(1);
- RegisterTimer(async x =>
+ this.RegisterGrainTimer(async x =>
{
var timeSinceLastQuery = DateTimeOffset.UtcNow - lastQuery;
@@ -72,7 +72,7 @@ public override Task OnActivateAsync(CancellationToken cancellationToken)
isEnabled = false;
await BroadcaseEnabled();
}
- }, null, interval, interval);
+ }, new() { DueTime = interval, Period = interval, Interleave = true, KeepAlive = true });
}
return base.OnActivateAsync(cancellationToken);
@@ -241,9 +241,9 @@ GrainMethodAggregate[] GetErrors()
var result = new Dictionary
{
- {"calls", GetTotalCalls()},
- {"latency", GetLatency()},
- {"errors", GetErrors()},
+ { "calls", GetTotalCalls() },
+ { "latency", GetLatency() },
+ { "errors", GetErrors() },
};
return result.AsImmutable();
@@ -286,9 +286,9 @@ public async Task> GetGrainState(string id, string grainType)
{
object[] grainMethodParameters;
if (string.IsNullOrWhiteSpace(keyExtension))
- grainMethodParameters = new object[] {interfaceType, grainId};
+ grainMethodParameters = new object[] { interfaceType, grainId };
else
- grainMethodParameters = new object[] {interfaceType, grainId, keyExtension};
+ grainMethodParameters = new object[] { interfaceType, grainId, keyExtension };
var grain = getGrainMethod.Invoke(GrainFactory, grainMethodParameters);
@@ -346,7 +346,7 @@ public Task> GetGrainTypes()
return Task.FromResult(GrainStateHelper.GetGrainTypes()
.Select(s => s.Namespace + "." + s.Name)
.ToArray()
- .AsImmutable());
+ .AsImmutable());
}
}
}
\ No newline at end of file
diff --git a/OrleansDashboard/OrleansDashboard.csproj b/OrleansDashboard/OrleansDashboard.csproj
index b78ded75..50b119e1 100644
--- a/OrleansDashboard/OrleansDashboard.csproj
+++ b/OrleansDashboard/OrleansDashboard.csproj
@@ -27,7 +27,7 @@
-
+
diff --git a/Tests/PerformanceTests/PerformanceTests.csproj b/Tests/PerformanceTests/PerformanceTests.csproj
index 03780499..84bdab17 100644
--- a/Tests/PerformanceTests/PerformanceTests.csproj
+++ b/Tests/PerformanceTests/PerformanceTests.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/Tests/UnitTests/GrainStateTests.cs b/Tests/UnitTests/GrainStateTests.cs
index f951e8ef..42b34030 100644
--- a/Tests/UnitTests/GrainStateTests.cs
+++ b/Tests/UnitTests/GrainStateTests.cs
@@ -1,5 +1,6 @@
using System;
using System.Linq;
+using System.Threading.Tasks;
using Xunit;
using OrleansDashboard;
using Orleans.TestingHost;
@@ -38,7 +39,7 @@ public void TestGetGrainsTypes()
}
[Fact]
- public async void TestWithGetStateMethod()
+ public async Task TestWithGetStateMethod()
{
var dashboardGrain = _cluster.GrainFactory.GetGrain(1);
var stateGrain = _cluster.GrainFactory.GetGrain(123);
@@ -53,7 +54,7 @@ public async void TestWithGetStateMethod()
}
[Fact]
- public async void TestWithIStorageField()
+ public async Task TestWithIStorageField()
{
var dashboardGrain = _cluster.GrainFactory.GetGrain(1);
var stateGrain = _cluster.GrainFactory.GetGrain(123);
diff --git a/Tests/UnitTests/UnitTests.csproj b/Tests/UnitTests/UnitTests.csproj
index ec04764e..b9754d2a 100644
--- a/Tests/UnitTests/UnitTests.csproj
+++ b/Tests/UnitTests/UnitTests.csproj
@@ -6,10 +6,10 @@
-
+
-
-
+
+
all
runtime; build; native; contentfiles; analyzers