示例#1
0
 public DfaState(
     Candidate[] candidates,
     IEndpointSelectorPolicy[] policies,
     JumpTable pathTransitions,
     PolicyJumpTable policyTransitions)
 {
     Candidates        = candidates;
     Policies          = policies;
     PathTransitions   = pathTransitions;
     PolicyTransitions = policyTransitions;
 }
示例#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;
        }
示例#3
0
 public DfaState(Candidate[] candidates, JumpTable pathTransitions, PolicyJumpTable policyTransitions)
 {
     Candidates        = candidates;
     PathTransitions   = pathTransitions;
     PolicyTransitions = policyTransitions;
 }