예제 #1
0
        private AgentInstance[] GetAgentInstancesForStmt(
            int statementId,
            ContextPartitionSelector selector)
        {
            var agentInstanceIds = GetAgentInstanceIds(selector);
            if (agentInstanceIds == null || agentInstanceIds.IsEmpty()) {
                return new AgentInstance[0];
            }

            foreach (var entry in Statements) {
                if (entry.Value.Lightweight.StatementContext.StatementId == statementId) {
                    var agentInstances = ContextManagerUtil.GetAgentInstances(entry.Value, agentInstanceIds);
                    return agentInstances.ToArray();
                }
            }

            return null;
        }
예제 #2
0
 public void ActivateCreateVariableStatement(ContextControllerStatementDesc statement)
 {
     var ids = ContextManager.ContextPartitionIdService.Ids;
     ContextManagerUtil.GetAgentInstances(statement, ids);
 }