Interface IEvaluationChain

  • All Known Implementing Classes:
    EvaluationChain

    public interface IEvaluationChain
    Evaluation chain is a chain of evaluation requests to perform in IEvaluationEngine. 1C:Enterprise Runtime debug server may perform multiple evaluations with single evaluation requst and clients may combine their evaluation requests to single chain and send single evaluation request and it will be faster than send single requests multiple times.

    Clients may combine(..) evaluation chains with other evaluation chains or single evaluation requests to get single evaluation chain.

    Order of requests in chain may be important, cause 1C:Enterprise debug server will evaluate them in the same order as chain was constructed.

    Example of usage:

     // re-evaluate variable1 and variable2
     IEvaluationChain evaluationChain = variable1.reevaluate().combine(variable2.reevaluate());
    
     // evaluate also new evaluation
     evaluationChain = evaluationChain.combine(new EvaluationRequest(stackFrame, expressionUuid, path, interfaces,
         result -> {
             // this code will be performed asynchronously
             if (result.isSuccess())
             {
                 showResult(result.getResult());
             }
             else
             {
                 showError(result.getErrorMessage());
             }
         });
    
     // send evaluation chain request
     stackFrame.getDebugTarget().getEvaluationEngine().evaluateExpressions(evaluationChain,
         stackFrame.getThread().getRuntimeDebugTarget());
     

    Clients may use default implementation.

    See Also:
    IEvaluationRequest, IEvaluationEngine
    Restriction:
    This interface is not intended to be extended by clients.
    Restriction:
    This interface is not intended to be implemented by clients.
    • Method Detail

      • combine

        IEvaluationChain combine​(IEvaluationRequest... requests)
        Combine this evaluation chain with given possibly-null evaluation requests. Resulting evaluation chain requests will contain all given evaluation requests.

        Order of the result evaluation chain requests will be:

        1. This evaluation chain requests.
        2. All merged evaluation requests in the same order as in method invocation.
        Parameters:
        requests - evaliation requests to combine this evaluation chain with, can be null or contain nulls, then these evaluation requests will be ignored during combining
        Returns:
        a reference to this evaluation chain to provide an ability to construct fluent queries, never null
      • combine

        IEvaluationChain combine​(IEvaluationChain... chains)
        Combine this evaluation chain with given possibly-null evaluation chains. Resulting evaluation chain requests will contain all given evaluation chains evaluation requests.

        Order of the result evaluation chain requests will be:

        1. This evaluation chain requests.
        2. All merged evaluation chains requests in the same order as in method invocation.
        Parameters:
        chains - evaliation chains to combine this evaluation chain with, can be null or contain nulls, then these evaluation chains will be ignored during combining
        Returns:
        a reference to this evaluation chain to provide an ability to construct fluent queries, never null
      • getStackFrame

        IBslStackFrame getStackFrame()
        Returns BSL stack frame this evaluation chain belongs to.
        Returns:
        BSL stack frame this evaluation chain belongs to, never null
      • size

        int size()
        Returns size of the evaluation chain: number of requests to perform this evaluation chain.
        Returns:
        size of the evaluation chain number of requests to perform this evaluation chain
      • toRequests

        IEvaluationRequest[] toRequests()
        Returns evaluation requests to perform this entire evaluation chain.
        Returns:
        evaluation requests to perform this entire evaluation chain, never null or empty