Пример #1
0
 public virtual Task Init(IWorkerGrain self, PredicateBase predicate, IPrincipalGrain principalGrain)
 {
     this.self           = self;
     this.principalGrain = principalGrain;
     this.predicate      = predicate;
     return(Task.CompletedTask);
 }
Пример #2
0
        public async Task Init(IControllerGrain controllerGrain, Guid workflowID, Operator currentOperator)
        {
            this.controllerGrain = controllerGrain;
            this.workflowID      = workflowID;
            this.operatorID      = currentOperator.OperatorGuid;
            this.self            = currentOperator.PrincipalGrain;
            this.predicate       = currentOperator.Predicate;
            await BuildWorkerTopology();

            PassExtraParametersByPredicate(ref this.predicate);
            foreach (List <IWorkerGrain> grainList in operatorGrains)
            {
                foreach (IWorkerGrain grain in grainList)
                {
                    await grain.Init(grain, predicate, self);
                }
            }
        }
Пример #3
0
 protected virtual void PassExtraParametersByPredicate(ref PredicateBase predicate)
 {
 }
Пример #4
0
 public Operator(PredicateBase predicate, bool isStartOperator = false)
 {
     this.IsStartOperator = isStartOperator;
     this.OperatorGuid    = Guid.NewGuid();
     this.Predicate       = predicate;
 }