Closed michaelmcneilnet closed 9 months ago
v4.0.0-beta1
I am trying to create a new grain with the following code
var grain = await Silo.CreateGrainAsync<MyGrain>("a");
but it seems the generic for CreateGrainAsync is constrained to type of Grain.
CreateGrainAsync
Grain
From src/OrleansTestKit/TestKitSilo:
src/OrleansTestKit/TestKitSilo
public Task<T> CreateGrainAsync<T>(string id) where T : Grain, IGrainWithStringKey => CreateGrainAsync<T>(IdSpan.Create(id));
Is there a way to create grains that are not based on Grain? My grain implements IGrainBase instead.
IGrainBase
@michaelmcneilnet v4.0.0 has been released to GitHub and NuGet that includes support for POCO grains thanks to spingee in #130.
v4.0.0-beta1
I am trying to create a new grain with the following code
but it seems the generic for
CreateGrainAsync
is constrained to type ofGrain
.From
src/OrleansTestKit/TestKitSilo
:Is there a way to create grains that are not based on
Grain
? My grain implementsIGrainBase
instead.