/// <summary> /// Create transparent proxy for instance of actor class /// </summary> /// <param name="context">work context</param> /// <param name="instance">instance of actor class</param> /// <param name="manager">actor manager</param> /// <returns>proxy</returns> public static T Create(IActorBase instance, ActorHost actorHost) { instance.VerifyNotNull(nameof(instance)); actorHost.VerifyNotNull(nameof(actorHost)); object proxyObject = Create <T, ActorProxy <T> >(); ActorProxy <T> proxy = (ActorProxy <T>)proxyObject; proxy._instance = instance; proxy._actorHost = actorHost; return((T)proxyObject); }