/// <inheritdoc/> public override async Task <bool> Apply(Guid id, AgentInfo agentInfo, AgentStrategyLogicContext context) { var agent = context.GrainFactory.GetGrain <IAgent>(id); var engagements = await agent.GetActiveEngagements(); return(engagements.Count() > 0); }
public PublishStrategy(ILogger <PublishStrategy> logger) { Logger = logger; StrategyContext = new AgentStrategyLogicContext(GrainFactory); }
public HibernateStrategy(ILogger <HibernateStrategy> logger) { Logger = logger; StrategyContext = new AgentStrategyLogicContext(GrainFactory); }
/// <inheritdoc/> public override Task <bool> Apply(Guid id, AgentInfo agentInfo, AgentStrategyLogicContext context) { return(Task.FromResult(true)); // TODO: Make some simple check about the score of the agent }
/// <inheritdoc/> public override Task <bool> Apply(Guid id, AgentInfo agentInfo, AgentStrategyLogicContext context) { return(Task.FromResult(true)); }
/// <inheritdoc/> public abstract Task <bool> Apply(Guid id, AgentInfo agentInfo, AgentStrategyLogicContext context);
public SubscribeStrategy(ILogger <SubscribeStrategy> logger) { Logger = logger; StrategyContext = new AgentStrategyLogicContext(GrainFactory); }