public virtual Task Init(IWorkerGrain self, PredicateBase predicate, IPrincipalGrain principalGrain) { this.self = self; this.principalGrain = principalGrain; this.predicate = predicate; return(Task.CompletedTask); }
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); } } }
protected virtual void PassExtraParametersByPredicate(ref PredicateBase predicate) { }
public Operator(PredicateBase predicate, bool isStartOperator = false) { this.IsStartOperator = isStartOperator; this.OperatorGuid = Guid.NewGuid(); this.Predicate = predicate; }