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 })); }
public static Task <IActorClientProxy <T> > CreateProxy <T>(IPEndPoint remoteEndPoint) { var proxyCreator = new ActorClientProxy(); return(proxyCreator.AuxCreate <T>(remoteEndPoint)); }