diff --git a/OrleansDashboard/Implementation/Grains/DashboardGrain.cs b/OrleansDashboard/Implementation/Grains/DashboardGrain.cs index 5292c690..7edba965 100644 --- a/OrleansDashboard/Implementation/Grains/DashboardGrain.cs +++ b/OrleansDashboard/Implementation/Grains/DashboardGrain.cs @@ -272,7 +272,8 @@ public async Task> GetGrainState(string id, string grainType) try { - var implementationType = GrainStateHelper.GetGrainType(grainType, typeManifestOptions); + var implementationType = typeManifestOptions.InterfaceImplementations + .FirstOrDefault(w => w.FullName.Equals(grainType)); var mappedGrainId = GrainStateHelper.GetGrainId(id, implementationType); object grainId = mappedGrainId.Item1; diff --git a/OrleansDashboard/Implementation/Helpers/GrainStateHelper.cs b/OrleansDashboard/Implementation/Helpers/GrainStateHelper.cs index a568fbdc..6c1d30d3 100644 --- a/OrleansDashboard/Implementation/Helpers/GrainStateHelper.cs +++ b/OrleansDashboard/Implementation/Helpers/GrainStateHelper.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using Orleans.Serialization.Configuration; namespace OrleansDashboard.Implementation.Helpers { @@ -92,11 +91,5 @@ public static MethodInfo GenerateGetGrainMethod(IGrainFactory grainFactory, obje && w.GetParameters()[2].ParameterType == typeof(string)); } } - - public static Type GetGrainType(string grainType, TypeManifestOptions typeManifestOptions) - { - return typeManifestOptions.InterfaceImplementations - .FirstOrDefault(w => w.FullName.Equals(grainType)); - } } } \ No newline at end of file