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