public static ActorPlacementRequest From(PlacementTarget target) { var @interface = ActorType.Of(target.GrainIdentity.TypeCode).Interface; var id = target.GrainIdentity.PrimaryKeyString; var path = new ActorPath(@interface.Name, id); return(new ActorPlacementRequest(path, @interface.Mapping)); }
string On(CheckTypeCodeResolution x) { GrainReference reference = Self; var identity = reference.Identity(); var typeCode = identity.TypeCode; var @interface = ActorType.Of(typeCode); return(@interface.Name); }
static TAttribute AssertHasCustomAttribute <TActor, TAttribute>() where TActor : Actor where TAttribute : Attribute => AssertHasCustomAttribute <TAttribute>(ActorType.Of <TActor>().Grain);