Ejemplo n.º 1
0
 public DfaState(
     Candidate[] candidates,
     IEndpointSelectorPolicy[] policies,
     JumpTable pathTransitions,
     PolicyJumpTable policyTransitions)
 {
     Candidates        = candidates;
     Policies          = policies;
     PathTransitions   = pathTransitions;
     PolicyTransitions = policyTransitions;
 }
Ejemplo n.º 2
0
    public void Setup()
    {
        _dictionaryJumptable = new HttpMethodDictionaryPolicyJumpTable(
            0,
            new Dictionary <string, int>
        {
            [HttpMethods.Get] = 1
        },
            -1,
            new Dictionary <string, int>
        {
            [HttpMethods.Get] = 2
        });
        _singleEntryJumptable = new HttpMethodSingleEntryPolicyJumpTable(
            0,
            HttpMethods.Get,
            -1,
            supportsCorsPreflight: true,
            -1,
            2);

        _httpContext = new DefaultHttpContext();
        _httpContext.Request.Method = HttpMethods.Get;
    }