Пример #1
0
        public static Task <IActorClientProxy> CreateProxy(Type actorType, IPEndPoint remoteEndPoint)
        {
            var proxyCreator = new ActorClientProxy();

            return((Task <IActorClientProxy>)proxyCreator
                   .GetType()
                   .GetMethod("AuxCreate", BindingFlags.NonPublic | BindingFlags.Instance,
                              null, new Type[] { typeof(IPEndPoint) }, null)
                   .MakeGenericMethod(actorType)
                   .Invoke(proxyCreator, new[] { remoteEndPoint }));
        }
Пример #2
0
        public static Task <IActorClientProxy <T> > CreateProxy <T>(IPEndPoint remoteEndPoint)
        {
            var proxyCreator = new ActorClientProxy();

            return(proxyCreator.AuxCreate <T>(remoteEndPoint));
        }