Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
            string On(CheckTypeCodeResolution x)
            {
                GrainReference reference  = Self;
                var            identity   = reference.Identity();
                var            typeCode   = identity.TypeCode;
                var            @interface = ActorType.Of(typeCode);

                return(@interface.Name);
            }
Ejemplo n.º 3
0
 static TAttribute AssertHasCustomAttribute <TActor, TAttribute>() where TActor : Actor where TAttribute : Attribute =>
 AssertHasCustomAttribute <TAttribute>(ActorType.Of <TActor>().Grain);