40 instantiations of RewriteContext
Microsoft.AspNetCore.Rewrite (1)
RewriteMiddleware.cs (1)
56
var rewriteContext = new
RewriteContext
Microsoft.AspNetCore.Rewrite.Tests (39)
IISUrlRewrite\InputParserTests.cs (2)
96
var rewriteContext= new
RewriteContext
{ HttpContext = new DefaultHttpContext(features), StaticFileProvider = null, Logger = NullLogger.Instance };
162
return new
RewriteContext
{ HttpContext = context, StaticFileProvider = null, Logger = NullLogger.Instance };
IISUrlRewrite\ServerVariableTests.cs (2)
156
return new
RewriteContext
{ HttpContext = context ?? CreateTestHttpContext() };
175
var rewriteContext = new
RewriteContext
{ HttpContext = context };
IISUrlRewrite\UrlRewriteApplicationTests.cs (3)
26
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
45
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
68
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\HeaderSegmentTests.cs (2)
16
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
32
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\IsHttpsModSegmentTests.cs (1)
18
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\IsHttpsSegmentTests.cs (1)
18
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\IsIPV6SegmentTests.cs (3)
17
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
32
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
47
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\LocalAddressSegmentTests.cs (2)
17
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
30
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\LocalPortSegmentTests.cs (1)
16
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\QueryStringSegmentTests.cs (1)
15
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\RemoteAddressSegmentTests.cs (2)
17
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
30
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\RemotePortSegmentTests.cs (1)
16
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\RequestFilenameSegmentTests.cs (1)
16
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\RequestMethodSegmentTests.cs (1)
16
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\SchemeSegmentTests.cs (1)
16
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\ServerNameSegmentTests.cs (1)
24
var context = new
RewriteContext
{ HttpContext = httpContext };
PatternSegments\ServerProtocolSegmentTests.cs (1)
17
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
PatternSegments\ToLowerSegmentTests.cs (1)
20
var context = new
RewriteContext
();
PatternSegments\UrlDecodeSegmentTests.cs (1)
20
var context = new
RewriteContext
();
PatternSegments\UrlEncodeSegmentTests.cs (1)
20
var context = new
RewriteContext
();
PatternSegments\UrlSegmentTests.cs (1)
33
var context = new
RewriteContext
{ HttpContext = httpContext };
UrlActions\AbortActionTests.cs (1)
13
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
UrlActions\ChangeCookieActionTests.cs (3)
16
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
37
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
53
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
UrlActions\ForbiddenActionTests.cs (1)
15
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
UrlActions\GoneActionTests.cs (1)
14
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
UrlMatches\ExactMatchTests.cs (1)
18
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
UrlMatches\IntegerMatchTests.cs (1)
30
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
UrlMatches\StringMatchTests.cs (1)
21
var context = new
RewriteContext
{ HttpContext = new DefaultHttpContext() };
105 references to RewriteContext
Microsoft.AspNetCore.Rewrite (64)
ApacheModRewrite\ApacheModRewriteRule.cs (1)
21
public void ApplyRule(
RewriteContext
context)
ApacheModRewrite\Condition.cs (1)
19
public MatchResults Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
ApacheModRewrite\ConditionEvaluator.cs (2)
10
public static MatchResults Evaluate(IEnumerable<Condition> conditions,
RewriteContext
context, BackReferenceCollection? backReferences)
15
public static MatchResults Evaluate(IEnumerable<Condition> conditions,
RewriteContext
context, BackReferenceCollection? backReferences, bool trackAllCaptures)
DelegateRule.cs (3)
8
private readonly Action<
RewriteContext
> _onApplyRule;
10
public DelegateRule(Action<
RewriteContext
> onApplyRule)
14
public void ApplyRule(
RewriteContext
context) => _onApplyRule(context);
IISUrlRewrite\Condition.cs (1)
17
public MatchResults Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
IISUrlRewrite\ConditionEvaluator.cs (1)
8
public static MatchResults Evaluate(ConditionCollection conditions,
RewriteContext
context, BackReferenceCollection? backReferences)
IISUrlRewrite\IISUrlRewriteRule.cs (1)
38
public void ApplyRule(
RewriteContext
context)
IRule.cs (2)
13
/// Implementations of ApplyRule should set the value for <see cref="
RewriteContext
.Result"/>
17
void ApplyRule(
RewriteContext
context);
Pattern.cs (1)
14
public string Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegment.cs (1)
8
public abstract string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences);
PatternSegments\ConditionMatchSegment.cs (1)
15
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\DateTimeSegment.cs (1)
45
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReference)
PatternSegments\HeaderSegment.cs (1)
15
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\IISServerVariableSegment.cs (1)
19
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\IsHttpsModSegment.cs (1)
10
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\IsHttpsUrlSegment.cs (1)
10
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\IsIPV6Segment.cs (1)
10
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\LiteralSegment.cs (1)
15
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\LocalAddressSegment.cs (1)
8
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\LocalPortSegment.cs (1)
10
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\QueryStringSegment.cs (1)
8
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackRefernces, BackReferenceCollection? conditionBackReferences)
PatternSegments\RemoteAddressSegment.cs (1)
8
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\RemotePortSegment.cs (1)
10
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\RequestFilenameSegment.cs (1)
8
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\RequestMethodSegment.cs (1)
8
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\RewriteMapSegment.cs (1)
19
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\RuleMatchSegment.cs (1)
17
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\SchemeSegment.cs (1)
8
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\ServerNameSegment.cs (1)
10
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\ServerProtocolSegment.cs (1)
10
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\ToLowerSegment.cs (1)
17
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\UrlDecodeSegment.cs (1)
17
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\UrlEncodeSegment.cs (1)
17
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
PatternSegments\UrlSegment.cs (1)
23
public override string? Evaluate(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
RedirectRule.cs (1)
27
public void ApplyRule(
RewriteContext
context)
RedirectToHttpsRule.cs (1)
15
public void ApplyRule(
RewriteContext
context)
RedirectToNonWwwRule.cs (1)
34
public void ApplyRule(
RewriteContext
context)
RedirectToWwwHelper.cs (1)
42
public static void SetRedirect(
RewriteContext
context, HostString newHost, int statusCode)
RedirectToWwwRule.cs (1)
34
public void ApplyRule(
RewriteContext
context)
RewriteMiddleware.cs (2)
56
var
rewriteContext = new RewriteContext
92
static void RunRules(
RewriteContext
rewriteContext, RewriteOptions options, HttpContext httpContext, ILogger logger)
RewriteOptionsExtensions.cs (1)
32
public static RewriteOptions Add(this RewriteOptions options, Action<
RewriteContext
> applyRule)
RewriteRule.cs (1)
27
public void ApplyRule(
RewriteContext
context)
UrlAction.cs (1)
10
public abstract void ApplyAction(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences);
UrlActions\AbortAction.cs (1)
10
public override void ApplyAction(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
UrlActions\ChangeCookieAction.cs (1)
35
public override void ApplyAction(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
UrlActions\CustomResponseAction.cs (1)
22
public override void ApplyAction(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
UrlActions\ForbiddenAction.cs (1)
10
public override void ApplyAction(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
UrlActions\GoneAction.cs (1)
10
public override void ApplyAction(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
UrlActions\NoneAction.cs (1)
15
public override void ApplyAction(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
UrlActions\RedirectAction.cs (1)
29
public override void ApplyAction(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
UrlActions\RewriteAction.cs (1)
45
public override void ApplyAction(
RewriteContext
context, BackReferenceCollection? ruleBackReferences, BackReferenceCollection? conditionBackReferences)
UrlMatch.cs (1)
9
public abstract MatchResults Evaluate(string input,
RewriteContext
context);
UrlMatches\ExactMatch.cs (1)
18
public override MatchResults Evaluate(string pattern,
RewriteContext
context)
UrlMatches\FileSizeMatch.cs (1)
13
public override MatchResults Evaluate(string input,
RewriteContext
context)
UrlMatches\IntegerMatch.cs (1)
36
public override MatchResults Evaluate(string input,
RewriteContext
context)
UrlMatches\IsDirectoryMatch.cs (1)
13
public override MatchResults Evaluate(string pattern,
RewriteContext
context)
UrlMatches\IsFileMatch.cs (1)
13
public override MatchResults Evaluate(string pattern,
RewriteContext
context)
UrlMatches\RegexMatch.cs (1)
18
public override MatchResults Evaluate(string pattern,
RewriteContext
context)
UrlMatches\StringMatch.cs (1)
26
public override MatchResults Evaluate(string input,
RewriteContext
context)
Microsoft.AspNetCore.Rewrite.Tests (41)
IISUrlRewrite\InputParserTests.cs (2)
96
var
rewriteContext= new RewriteContext { HttpContext = new DefaultHttpContext(features), StaticFileProvider = null, Logger = NullLogger.Instance };
159
private static
RewriteContext
CreateTestRewriteContext()
IISUrlRewrite\ServerVariableTests.cs (4)
81
var
rewriteContext = CreateTestRewriteContext(httpContext);
128
var
rewriteContext = CreateTestRewriteContext(httpContext);
154
private
RewriteContext
CreateTestRewriteContext(HttpContext context = null)
175
var
rewriteContext = new RewriteContext { HttpContext = context };
IISUrlRewrite\UrlRewriteApplicationTests.cs (3)
26
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
45
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
68
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\HeaderSegmentTests.cs (2)
16
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
32
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\IsHttpsModSegmentTests.cs (1)
18
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\IsHttpsSegmentTests.cs (1)
18
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\IsIPV6SegmentTests.cs (3)
17
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
32
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
47
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\LocalAddressSegmentTests.cs (2)
17
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
30
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\LocalPortSegmentTests.cs (1)
16
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\QueryStringSegmentTests.cs (1)
15
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\RemoteAddressSegmentTests.cs (2)
17
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
30
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\RemotePortSegmentTests.cs (1)
16
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\RequestFilenameSegmentTests.cs (1)
16
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\RequestMethodSegmentTests.cs (1)
16
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\SchemeSegmentTests.cs (1)
16
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\ServerNameSegmentTests.cs (1)
24
var
context = new RewriteContext { HttpContext = httpContext };
PatternSegments\ServerProtocolSegmentTests.cs (1)
17
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
PatternSegments\ToLowerSegmentTests.cs (1)
20
var
context = new RewriteContext();
PatternSegments\UrlDecodeSegmentTests.cs (1)
20
var
context = new RewriteContext();
PatternSegments\UrlEncodeSegmentTests.cs (1)
20
var
context = new RewriteContext();
PatternSegments\UrlSegmentTests.cs (1)
33
var
context = new RewriteContext { HttpContext = httpContext };
UrlActions\AbortActionTests.cs (1)
13
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
UrlActions\ChangeCookieActionTests.cs (3)
16
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
37
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
53
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
UrlActions\ForbiddenActionTests.cs (1)
15
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
UrlActions\GoneActionTests.cs (1)
14
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
UrlMatches\ExactMatchTests.cs (1)
18
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
UrlMatches\IntegerMatchTests.cs (1)
30
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };
UrlMatches\StringMatchTests.cs (1)
21
var
context = new RewriteContext { HttpContext = new DefaultHttpContext() };