3 instantiations of TemplateBinder
Microsoft.AspNetCore.Routing (3)
Template\DefaultTemplateBinderFactory.cs (2)
31
return new
TemplateBinder
(UrlEncoder.Default, _pool, template, defaults);
65
return new
TemplateBinder
(UrlEncoder.Default, _pool, pattern, policies);
Tree\TreeRouter.cs (1)
94
var binder = new
TemplateBinder
(urlEncoder, objectPool, entry.RouteTemplate, entry.Defaults);
39 references to TemplateBinder
Microsoft.AspNetCore.Routing (22)
DefaultLinkGenerator.cs (7)
33
private readonly DataSourceDependentCache<ConcurrentDictionary<RouteEndpoint,
TemplateBinder
>> _cache;
36
private readonly Func<RouteEndpoint,
TemplateBinder
> _createTemplateBinder;
51
_cache = new DataSourceDependentCache<ConcurrentDictionary<RouteEndpoint,
TemplateBinder
>>(dataSource, (_) =>
55
return new ConcurrentDictionary<RouteEndpoint,
TemplateBinder
>();
271
private
TemplateBinder
CreateTemplateBinder(RouteEndpoint endpoint)
277
internal
TemplateBinder
GetTemplateBinder(RouteEndpoint endpoint) => _cache.EnsureInitialized().GetOrAdd(endpoint, _createTemplateBinder);
288
var
templateBinder = GetTemplateBinder(endpoint);
RouteBase.cs (1)
21
private
TemplateBinder
? _binder;
Template\DefaultTemplateBinderFactory.cs (2)
26
public override
TemplateBinder
Create(RouteTemplate template, RouteValueDictionary defaults)
34
public override
TemplateBinder
Create(RoutePattern pattern)
Template\TemplateBinder.cs (2)
37
/// Creates a new instance of <see cref="
TemplateBinder
"/>.
53
/// Creates a new instance of <see cref="
TemplateBinder
"/>.
Template\TemplateBinderFactory.cs (7)
9
/// A factory used to create <see cref="
TemplateBinder
"/> instances.
14
/// Creates a new <see cref="
TemplateBinder
"/> from the provided <paramref name="template"/> and
19
/// <returns>A <see cref="
TemplateBinder
"/>.</returns>
20
public abstract
TemplateBinder
Create(RouteTemplate template, RouteValueDictionary defaults);
23
/// Creates a new <see cref="
TemplateBinder
"/> from the provided <paramref name="pattern"/>.
26
/// <returns>A <see cref="
TemplateBinder
"/>.</returns>
27
public abstract
TemplateBinder
Create(RoutePattern pattern);
Tree\OutboundMatch.cs (1)
23
public
TemplateBinder
TemplateBinder { get; set; }
Tree\TreeRouter.cs (2)
94
var
binder = new TemplateBinder(urlEncoder, objectPool, entry.RouteTemplate, entry.Defaults);
282
TemplateBinder
binder)
Microsoft.AspNetCore.Routing.Tests (17)
DefaultLinkGeneratorTest.cs (4)
572
var
expected = linkGenerator.GetTemplateBinder(endpoint1);
575
var
actual = linkGenerator.GetTemplateBinder(endpoint1);
589
var
original = linkGenerator.GetTemplateBinder(endpoint1);
595
var
actual = linkGenerator.GetTemplateBinder(endpoint1);
Template\TemplateBinderTests.cs (13)
112
var
binder = new TemplateBinder(
261
var
binder = new TemplateBinder(
709
var
binder = new TemplateBinder(
1138
var
binder = new TemplateBinder(
1219
Assert.True(
TemplateBinder
.RoutePartsEqual(left, right));
1223
Assert.False(
TemplateBinder
.RoutePartsEqual(left, right));
1236
var
binder = new TemplateBinder(
1265
var
binder = new TemplateBinder(
1295
var
binder = new TemplateBinder(
1325
var
binder = new TemplateBinder(
1355
var
binder = new TemplateBinder(
1389
var
binder = new TemplateBinder(
1419
var
binder = new TemplateBinder(