コード例 #1
0
        public static Definition From <T>(Stage stage, SerializationProxy <T>?proxy, ILogger logger)
        {
            Actor?parent = null;

            if (proxy?.Parent != null)
            {
                ActorProxyBase <T> .Thunk(stage, proxy.Parent);

                parent = stage.Directory.ActorOf(proxy.Parent?.Address);
            }

            return(new Definition(
                       proxy?.Type,
                       proxy?.Parameters ?? Enumerable.Empty <object>(),
                       parent,
                       proxy?.MailboxName,
                       proxy?.ActorName,
                       logger,
                       proxy?.Evictable ?? false
                       ));
        }
コード例 #2
0
 public static TNew Thunk <TNew>(ActorProxyBase <T> proxy, Actor actor, TNew arg) =>
 proxy.IsDistributable ? Thunk(actor.LifeCycle.Environment.Stage, arg) : arg;