internal static GrainClassData GetImplementation(IGrainTypeResolver grainTypeResolver, string grainImplementationClassName) { GrainClassData implementation; if (!grainTypeResolver.TryGetGrainClassData(grainImplementationClassName, out implementation)) { throw new ArgumentException(string.Format("Cannot find an implementation grain class: {0}. Make sure the grain assembly was correctly deployed and loaded in the silo.", grainImplementationClassName)); } return(implementation); }
internal static GrainClassData GetImplementation(IGrainTypeResolver grainTypeResolver, Type interfaceType, string grainClassNamePrefix = null) { GrainClassData implementation; if (!grainTypeResolver.TryGetGrainClassData(interfaceType, out implementation, grainClassNamePrefix)) { var loadedAssemblies = grainTypeResolver.GetLoadedGrainAssemblies(); throw new ArgumentException( String.Format("Cannot find an implementation class for grain interface: {0}{2}. Make sure the grain assembly was correctly deployed and loaded in the silo.{1}", interfaceType, String.IsNullOrEmpty(loadedAssemblies) ? String.Empty : String.Format(" Loaded grain assemblies: {0}", loadedAssemblies), String.IsNullOrEmpty(grainClassNamePrefix) ? String.Empty : ", grainClassNamePrefix=" + grainClassNamePrefix)); } return implementation; }
internal static GrainClassData GetImplementation(IGrainTypeResolver grainTypeResolver, Type interfaceType, string grainClassNamePrefix = null) { GrainClassData implementation; if (!grainTypeResolver.TryGetGrainClassData(interfaceType, out implementation, grainClassNamePrefix)) { var loadedAssemblies = grainTypeResolver.GetLoadedGrainAssemblies(); throw new ArgumentException( String.Format("Cannot find an implementation class for grain interface: {0}{2}. Make sure the grain assembly was correctly deployed and loaded in the silo.{1}", interfaceType, String.IsNullOrEmpty(loadedAssemblies) ? String.Empty : String.Format(" Loaded grain assemblies: {0}", loadedAssemblies), String.IsNullOrEmpty(grainClassNamePrefix) ? String.Empty : ", grainClassNamePrefix=" + grainClassNamePrefix)); } return(implementation); }