protected BaseMessagingActor(ActorService actorService, ActorId actorId,
                                     IBinaryMessageSerializer binaryMessageSerializer,
                                     IActorClient actorClient,
                                     IKeyValueStorage <string> storage,
                                     ILogger logger) : base(actorService, actorId, logger)
        {
            /*
             * Flow = BaseDependencyResolver.ResolveFlow();
             * if (Flow != null)
             * {
             *  CurrentRefStep = Flow.GetCurrentStep(CurrentActorServiceWithActorIdNotSpecified);
             *  NextStep = Flow.GetNextStep(CurrentRefStep);
             *  Orders = NextStep.Orders;
             * }*/

            Orders = OrchestrationOrderCollection.NoOrder();

            //resolve binary serializer

            BinaryMessageSerializer = binaryMessageSerializer ?? throw new ArgumentNullException(nameof(binaryMessageSerializer));
            ActorClient             = actorClient ?? throw new ArgumentNullException(nameof(actorClient));
            StorageService          = storage;

            //resolve storage
            //StorageService = BaseDependencyResolver.ResolveStorageService<string>();

            //resolve flowservice
            //AsyncFlowService = BaseDependencyResolver.ResolveFlowService();

            //resolve actorclient to be able to chain next
        }
示例#2
0
 protected NonBlockingActor(ActorService actorService, ActorId actorId,
                            IActorRequestPersistence actorRequestPersistence,
                            IBinaryMessageSerializer binaryMessageSerializer,
                            IActorClient actorClient,
                            IKeyValueStorage <string> storage, ILogger logger) : base(actorService,
                                                                                      actorId,
                                                                                      binaryMessageSerializer,
                                                                                      actorClient,
                                                                                      storage,
                                                                                      logger)
 {
     ActorRequestPersistence = actorRequestPersistence;
     ActorRequestPersistence.SetActorStateManager(StateManager);
 }
示例#3
0
 static ActionInvoker()
 {
     _actorClient             = CoreDependencyResolver.Container.Resolve <IActorClient>();
     _binaryMessageSerializer = CoreDependencyResolver.Container.Resolve <IBinaryMessageSerializer>();
 }
示例#4
0
 public ActorClientProxy(IActorClient <TEvent, TCommand> client)
 {
     _client = client;
 }