51 instantiations of CompiledViewDescriptor
Microsoft.AspNetCore.Mvc.Razor (2)
ApplicationParts\RazorCompiledItemFeatureProvider.cs (1)
46
var descriptor = new
CompiledViewDescriptor
(compiledItem);
Compilation\DefaultViewCompiler.cs (1)
111
return Task.FromResult(new
CompiledViewDescriptor
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (3)
RuntimeViewCompiler.cs (3)
226
item.Descriptor = new
CompiledViewDescriptor
()
256
Descriptor = new
CompiledViewDescriptor
()
330
return new
CompiledViewDescriptor
(item);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (22)
RuntimeViewCompilerTest.cs (22)
142
var expected2 = new
CompiledViewDescriptor
();
168
var expected2 = new
CompiledViewDescriptor
();
193
var precompiledView = new
CompiledViewDescriptor
219
var precompiledView = new
CompiledViewDescriptor
239
var precompiledView = new
CompiledViewDescriptor
261
var precompiledView = new
CompiledViewDescriptor
299
var precompiledView = new
CompiledViewDescriptor
334
var precompiledView = new
CompiledViewDescriptor
366
var expected = new
CompiledViewDescriptor
();
368
var precompiledView = new
CompiledViewDescriptor
396
var precompiledView = new
CompiledViewDescriptor
424
var expected2 = new
CompiledViewDescriptor
();
426
var precompiledView = new
CompiledViewDescriptor
463
var precompiledView = new
CompiledViewDescriptor
497
var expected1 = new
CompiledViewDescriptor
();
499
var precompiledView = new
CompiledViewDescriptor
537
var expected2 = new
CompiledViewDescriptor
();
539
var precompiledView = new
CompiledViewDescriptor
585
var result1 = new
CompiledViewDescriptor
();
586
var result2 = new
CompiledViewDescriptor
();
666
return new
CompiledViewDescriptor
();
874
Compile = path => new
CompiledViewDescriptor
Microsoft.AspNetCore.Mvc.Razor.Test (10)
Compilation\DefaultRazorPageFactoryProviderTest.cs (3)
22
var descriptor = new
CompiledViewDescriptor
52
var descriptor = new
CompiledViewDescriptor
78
var descriptor = new
CompiledViewDescriptor
Compilation\DefaultViewCompilerTest.cs (5)
31
var compiledView = new
CompiledViewDescriptor
55
var precompiledView = new
CompiledViewDescriptor
73
var compiledView = new
CompiledViewDescriptor
91
var compiledView = new
CompiledViewDescriptor
108
var hotReloaded = new
CompiledViewDescriptor
{ RelativePath = path };
RazorViewEngineTest.cs (1)
2043
var descriptor = new
CompiledViewDescriptor
RazorViewTest.cs (1)
252
var pageFactoryResult = new RazorPageFactoryResult(new
CompiledViewDescriptor
(), () => layout);
Microsoft.AspNetCore.Mvc.RazorPages.Test (14)
ApplicationModels\CompiledPageRouteModelProviderTest.cs (3)
447
var descriptor = new
CompiledViewDescriptor
(TestRazorCompiledItem.CreateForPage("/Pages/About.cshtml", metadata: new object[]
463
var descriptor = new
CompiledViewDescriptor
(TestRazorCompiledItem.CreateForPage("/Pages/About.cshtml"));
483
provider.Descriptors.Add(new
CompiledViewDescriptor
(items[i]));
Builder\PageActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (1)
244
feature.ViewDescriptors.Add(new
CompiledViewDescriptor
(TestRazorCompiledItem.CreateForPage(typeof(Index), "/Pages/Index.cshtml")));
Infrastructure\DefaultPageLoaderTest.cs (1)
358
var descriptor = new
CompiledViewDescriptor
(compiledItem);
Infrastructure\PageActionInvokerProviderTest.cs (9)
168
.Returns(new RazorPageFactoryResult(new
CompiledViewDescriptor
(), factory1));
171
.Returns(new RazorPageFactoryResult(new
CompiledViewDescriptor
(), factory2));
388
.Returns(new RazorPageFactoryResult(new
CompiledViewDescriptor
(), () => null))
392
.Returns(new RazorPageFactoryResult(new
CompiledViewDescriptor
(), () => null))
396
.Returns(new RazorPageFactoryResult(new
CompiledViewDescriptor
(), () => null))
400
.Returns(new RazorPageFactoryResult(new
CompiledViewDescriptor
(), () => null))
437
.Returns(new RazorPageFactoryResult(new
CompiledViewDescriptor
(), () => null));
440
.Returns(new RazorPageFactoryResult(new
CompiledViewDescriptor
(), razorPageFactory: null));
443
.Returns(new RazorPageFactoryResult(new
CompiledViewDescriptor
(), () => null));
101 references to CompiledViewDescriptor
Microsoft.AspNetCore.Identity.UI (4)
IdentityBuilderUIExtensions.cs (4)
113
var viewsToRemove = new List<
CompiledViewDescriptor
>();
114
foreach (
var
descriptor in feature.ViewDescriptors)
150
foreach (
var
descriptorToRemove in viewsToRemove)
156
private static bool IsIdentityUIView(
CompiledViewDescriptor
desc) => desc.RelativePath.StartsWith("/Areas/Identity", StringComparison.OrdinalIgnoreCase) &&
Microsoft.AspNetCore.Mvc.Razor (21)
ApplicationParts\RazorCompiledItemFeatureProvider.cs (1)
46
var
descriptor = new CompiledViewDescriptor(compiledItem);
Compilation\CompiledViewDescriptor.cs (3)
15
/// Creates a new <see cref="
CompiledViewDescriptor
"/>.
22
/// Creates a new <see cref="
CompiledViewDescriptor
"/>.
35
/// Creates a new <see cref="
CompiledViewDescriptor
"/>. At least one of <paramref name="attribute"/> or
Compilation\DefaultRazorPageFactoryProvider.cs (1)
39
var
viewDescriptor = compileTask.GetAwaiter().GetResult();
Compilation\DefaultViewCompiler.cs (5)
23
private Dictionary<string, Task<
CompiledViewDescriptor
>>? _compiledViews;
52
var compiledViews = new Dictionary<string, Task<
CompiledViewDescriptor
>>(
56
foreach (
var
compiledView in viewsFeature.ViewDescriptors)
79
internal Dictionary<string, Task<
CompiledViewDescriptor
>>? CompiledViews => _compiledViews;
88
public Task<
CompiledViewDescriptor
> CompileAsync(string relativePath)
Compilation\IViewCompiler.cs (2)
15
/// <returns>A <see cref="
CompiledViewDescriptor
"/>.</returns>
16
Task<
CompiledViewDescriptor
> CompileAsync(string relativePath);
Compilation\ViewsFeature.cs (3)
12
/// A list of <see cref="
CompiledViewDescriptor
"/>.
14
public IList<
CompiledViewDescriptor
> ViewDescriptors { get; } = new List<
CompiledViewDescriptor
>();
RazorPageFactoryResult.cs (4)
19
/// <param name="viewDescriptor">The <see cref="
CompiledViewDescriptor
"/>.</param>
21
CompiledViewDescriptor
viewDescriptor,
35
/// Gets the <see cref="
CompiledViewDescriptor
"/>.
37
public
CompiledViewDescriptor
? ViewDescriptor { get; }
RazorViewEngine.cs (2)
398
var
viewDescriptor = factoryResult.ViewDescriptor;
434
var
viewDescriptor = result.ViewDescriptor;
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (16)
RuntimeViewCompiler.cs (16)
27
private readonly Dictionary<string,
CompiledViewDescriptor
> _precompiledViews;
39
IList<
CompiledViewDescriptor
> precompiledViews,
63
_precompiledViews = new Dictionary<string,
CompiledViewDescriptor
>(
67
foreach (
var
precompiledView in precompiledViews)
85
public Task<
CompiledViewDescriptor
> CompileAsync(string relativePath)
91
if (_cache.TryGetValue<Task<
CompiledViewDescriptor
>>(relativePath, out var cachedResult) && cachedResult is not null)
107
private Task<
CompiledViewDescriptor
> OnCacheMiss(string normalizedPath)
110
TaskCompletionSource<
CompiledViewDescriptor
> taskSource;
119
if (_cache.TryGetValue<Task<
CompiledViewDescriptor
>>(normalizedPath, out var result) && result is not null)
124
if (_precompiledViews.TryGetValue(normalizedPath, out
var
precompiledView))
144
taskSource = new TaskCompletionSource<
CompiledViewDescriptor
>(creationOptions: TaskCreationOptions.RunContinuationsAsynchronously);
177
var
descriptor = CompileAndEmit(normalizedPath);
190
private ViewCompilerWorkItem CreatePrecompiledWorkItem(string normalizedPath,
CompiledViewDescriptor
precompiledView)
280
private IList<IChangeToken> GetExpirationTokens(
CompiledViewDescriptor
precompiledView)
312
protected virtual
CompiledViewDescriptor
CompileAndEmit(string relativePath)
406
public
CompiledViewDescriptor
Descriptor { get; set; } = default!;
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (29)
RuntimeViewCompilerTest.cs (29)
142
var
expected2 = new CompiledViewDescriptor();
168
var
expected2 = new CompiledViewDescriptor();
193
var
precompiledView = new CompiledViewDescriptor
219
var
precompiledView = new CompiledViewDescriptor
239
var
precompiledView = new CompiledViewDescriptor
261
var
precompiledView = new CompiledViewDescriptor
299
var
precompiledView = new CompiledViewDescriptor
334
var
precompiledView = new CompiledViewDescriptor
366
var
expected = new CompiledViewDescriptor();
368
var
precompiledView = new CompiledViewDescriptor
396
var
precompiledView = new CompiledViewDescriptor
424
var
expected2 = new CompiledViewDescriptor();
426
var
precompiledView = new CompiledViewDescriptor
463
var
precompiledView = new CompiledViewDescriptor
497
var
expected1 = new CompiledViewDescriptor();
499
var
precompiledView = new CompiledViewDescriptor
537
var
expected2 = new CompiledViewDescriptor();
539
var
precompiledView = new CompiledViewDescriptor
585
var
result1 = new CompiledViewDescriptor();
586
var
result2 = new CompiledViewDescriptor();
733
var
result = compiler.CompileAndEmit(codeDocument, content);
794
var
result = compiler.CompileAndEmit(codeDocument, "public class Test{}");
814
var
result = compiler.CompileAndEmit(codeDocument, "public class Test{}");
823
IList<
CompiledViewDescriptor
> precompiledViews = null,
834
precompiledViews = precompiledViews ?? Array.Empty<
CompiledViewDescriptor
>();
867
IList<
CompiledViewDescriptor
> precompiledViews,
868
Func<string,
CompiledViewDescriptor
> compile = null)
882
public Func<string,
CompiledViewDescriptor
> Compile { get; set; }
884
protected override
CompiledViewDescriptor
CompileAndEmit(string relativePath)
Microsoft.AspNetCore.Mvc.Razor.Test (15)
Compilation\DefaultRazorPageFactoryProviderTest.cs (3)
22
var
descriptor = new CompiledViewDescriptor
52
var
descriptor = new CompiledViewDescriptor
78
var
descriptor = new CompiledViewDescriptor
Compilation\DefaultViewCompilerTest.cs (11)
31
var
compiledView = new CompiledViewDescriptor
55
var
precompiledView = new CompiledViewDescriptor
73
var
compiledView = new CompiledViewDescriptor
91
var
compiledView = new CompiledViewDescriptor
95
var compiledViews = new List<
CompiledViewDescriptor
>
108
var
hotReloaded = new CompiledViewDescriptor { RelativePath = path };
118
private static TestRazorViewCompiler GetViewCompiler(IList<
CompiledViewDescriptor
> compiledViews = null)
120
compiledViews = compiledViews ?? Array.Empty<
CompiledViewDescriptor
>();
128
public TestRazorViewCompiler(IList<
CompiledViewDescriptor
> compiledViews) :
149
public IList<
CompiledViewDescriptor
> CompiledViews { get; init; }
153
foreach (
var
item in CompiledViews)
RazorViewEngineTest.cs (1)
2043
var
descriptor = new CompiledViewDescriptor
Microsoft.AspNetCore.Mvc.RazorPages (10)
ApplicationModels\CompiledPageRouteModelProvider.cs (5)
48
private IEnumerable<
CompiledViewDescriptor
> GetViewDescriptors(ApplicationPartManager applicationManager)
55
foreach (
var
viewDescriptor in viewsFeature.ViewDescriptors)
69
static bool IsRazorPage(
CompiledViewDescriptor
viewDescriptor)
96
foreach (
var
viewDescriptor in GetViewDescriptors(_applicationManager))
120
internal static string? GetRouteTemplate(
CompiledViewDescriptor
viewDescriptor)
Infrastructure\CompiledPageActionDescriptorFactory.cs (1)
35
CompiledViewDescriptor
viewDescriptor)
Infrastructure\CompiledPageActionDescriptorProvider.cs (3)
57
var lookup = new Dictionary<string,
CompiledViewDescriptor
>(feature.ViewDescriptors.Count, StringComparer.Ordinal);
59
foreach (
var
viewDescriptor in feature.ViewDescriptors)
69
if (!lookup.TryGetValue(pageActionDescriptor.RelativePath, out
var
compiledViewDescriptor))
Infrastructure\DefaultPageLoader.cs (1)
62
var
viewDescriptor = await Compiler.CompileAsync(actionDescriptor.RelativePath);
Microsoft.AspNetCore.Mvc.RazorPages.Test (6)
ApplicationModels\CompiledPageRouteModelProviderTest.cs (5)
447
var
descriptor = new CompiledViewDescriptor(TestRazorCompiledItem.CreateForPage("/Pages/About.cshtml", metadata: new object[]
463
var
descriptor = new CompiledViewDescriptor(TestRazorCompiledItem.CreateForPage("/Pages/About.cshtml"));
499
public List<
CompiledViewDescriptor
> Descriptors { get; } = new List<
CompiledViewDescriptor
>();
504
foreach (
var
descriptor in Descriptors)
Infrastructure\DefaultPageLoaderTest.cs (1)
358
var
descriptor = new CompiledViewDescriptor(compiledItem);