12 instantiations of RazorCodeDocument
Microsoft.CodeAnalysis.Razor.Compiler (12)
Language\RazorCodeDocument.cs (12)
92return new RazorCodeDocument( 128return new RazorCodeDocument(Source, Imports, ParserOptions, CodeGenerationOptions, value, _referencedTagHelpers, _syntaxTree, _tagHelperRewrittenSyntaxTree, _importSyntaxTrees, _tagHelperContext, _documentNode, _csharpDocument, _declCSharpDocument, _directiveTagHelperContributions, _unresolvedDocumentNode); 149return new RazorCodeDocument(Source, Imports, ParserOptions, CodeGenerationOptions, _tagHelpers, value, _syntaxTree, _tagHelperRewrittenSyntaxTree, _importSyntaxTrees, _tagHelperContext, _documentNode, _csharpDocument, _declCSharpDocument, _directiveTagHelperContributions, _unresolvedDocumentNode); 171return new RazorCodeDocument(Source, Imports, ParserOptions, CodeGenerationOptions, _tagHelpers, _referencedTagHelpers, value, _tagHelperRewrittenSyntaxTree, _importSyntaxTrees, _tagHelperContext, _documentNode, _csharpDocument, _declCSharpDocument, _directiveTagHelperContributions, _unresolvedDocumentNode); 193return new RazorCodeDocument(Source, Imports, ParserOptions, CodeGenerationOptions, _tagHelpers, _referencedTagHelpers, _syntaxTree, value, _importSyntaxTrees, _tagHelperContext, _documentNode, _csharpDocument, _declCSharpDocument, _directiveTagHelperContributions, _unresolvedDocumentNode); 220return new RazorCodeDocument(Source, Imports, ParserOptions, CodeGenerationOptions, _tagHelpers, _referencedTagHelpers, _syntaxTree, _tagHelperRewrittenSyntaxTree, value, _tagHelperContext, _documentNode, _csharpDocument, _declCSharpDocument, _directiveTagHelperContributions, _unresolvedDocumentNode); 243return new RazorCodeDocument(Source, Imports, ParserOptions, CodeGenerationOptions, _tagHelpers, _referencedTagHelpers, _syntaxTree, _tagHelperRewrittenSyntaxTree, _importSyntaxTrees, value, _documentNode, _csharpDocument, _declCSharpDocument, _directiveTagHelperContributions, _unresolvedDocumentNode); 265return new RazorCodeDocument(Source, Imports, ParserOptions, CodeGenerationOptions, _tagHelpers, _referencedTagHelpers, _syntaxTree, _tagHelperRewrittenSyntaxTree, _importSyntaxTrees, _tagHelperContext, value, _csharpDocument, _declCSharpDocument, _directiveTagHelperContributions, _unresolvedDocumentNode); 278return new RazorCodeDocument(Source, Imports, ParserOptions, CodeGenerationOptions, _tagHelpers, _referencedTagHelpers, _syntaxTree, _tagHelperRewrittenSyntaxTree, _importSyntaxTrees, _tagHelperContext, _documentNode, _csharpDocument, _declCSharpDocument, _directiveTagHelperContributions, value); 294return new RazorCodeDocument(Source, Imports, ParserOptions, CodeGenerationOptions, _tagHelpers, _referencedTagHelpers, _syntaxTree, _tagHelperRewrittenSyntaxTree, _importSyntaxTrees, _tagHelperContext, _documentNode, value, _declCSharpDocument, _directiveTagHelperContributions, _unresolvedDocumentNode); 304return new RazorCodeDocument(Source, Imports, ParserOptions, CodeGenerationOptions, _tagHelpers, _referencedTagHelpers, _syntaxTree, _tagHelperRewrittenSyntaxTree, _importSyntaxTrees, _tagHelperContext, _documentNode, _csharpDocument, value, _directiveTagHelperContributions, _unresolvedDocumentNode); 317return new RazorCodeDocument(Source, Imports, ParserOptions, CodeGenerationOptions, _tagHelpers, _referencedTagHelpers, _syntaxTree, _tagHelperRewrittenSyntaxTree, _importSyntaxTrees, _tagHelperContext, _documentNode, _csharpDocument, _declCSharpDocument, value, _unresolvedDocumentNode);
206 references to RazorCodeDocument
Microsoft.CodeAnalysis.Razor.Compiler (205)
CSharp\Utf8WriteLiteralDetectionPass.cs (1)
20RazorCodeDocument codeDocument,
Language\CodeGeneration\CodeTarget.cs (3)
9public abstract class CodeTarget(RazorCodeDocument codeDocument, ImmutableArray<ICodeTargetExtension> targetExtensions) 11public RazorCodeDocument CodeDocument => codeDocument; 16RazorCodeDocument codeDocument,
Language\CodeGeneration\CodeTargetBuilder.cs (2)
8public abstract class CodeTargetBuilder(RazorCodeDocument codeDocument) 12public RazorCodeDocument CodeDocument => codeDocument;
Language\CodeGeneration\DefaultCodeTarget.cs (1)
9RazorCodeDocument codeDocument,
Language\CodeGeneration\DefaultCodeTargetBuilder.cs (1)
6internal sealed class DefaultCodeTargetBuilder(RazorCodeDocument codeDocument) : CodeTargetBuilder(codeDocument)
Language\Components\ComponentBindLoweringPass.cs (1)
28RazorCodeDocument codeDocument,
Language\Components\ComponentChildContentDiagnosticPass.cs (1)
16RazorCodeDocument codeDocument,
Language\Components\ComponentCodeTarget.cs (1)
10RazorCodeDocument codeDocument,
Language\Components\ComponentComplexAttributeContentPass.cs (1)
21RazorCodeDocument codeDocument,
Language\Components\ComponentCssScopePass.cs (1)
16RazorCodeDocument codeDocument,
Language\Components\ComponentDocumentClassifierPass.cs (4)
41protected override bool IsMatch(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) 46protected override CodeTarget CreateTarget(RazorCodeDocument codeDocument) 51RazorCodeDocument codeDocument, 137private static bool TryComputeClassName(RazorCodeDocument codeDocument, [NotNullWhen(true)] out string? className)
Language\Components\ComponentEventHandlerLoweringPass.cs (1)
19RazorCodeDocument codeDocument,
Language\Components\ComponentFormNameLoweringPass.cs (1)
16RazorCodeDocument codeDocument,
Language\Components\ComponentGenericTypePass.cs (1)
30RazorCodeDocument codeDocument,
Language\Components\ComponentInjectDirectivePass.cs (1)
16RazorCodeDocument codeDocument,
Language\Components\ComponentKeyLoweringPass.cs (1)
16RazorCodeDocument codeDocument,
Language\Components\ComponentLayoutDirectivePass.cs (1)
13RazorCodeDocument codeDocument,
Language\Components\ComponentLoweringPass.cs (1)
22RazorCodeDocument codeDocument,
Language\Components\ComponentMarkupBlockPass.cs (1)
34RazorCodeDocument codeDocument,
Language\Components\ComponentMarkupDiagnosticPass.cs (1)
18RazorCodeDocument codeDocument,
Language\Components\ComponentMarkupEncodingPass.cs (1)
23RazorCodeDocument codeDocument,
Language\Components\ComponentPageDirectivePass.cs (1)
14RazorCodeDocument codeDocument,
Language\Components\ComponentReferenceCaptureLoweringPass.cs (1)
16RazorCodeDocument codeDocument,
Language\Components\ComponentRenderModeDirectivePass.cs (1)
16RazorCodeDocument codeDocument,
Language\Components\ComponentRenderModeLoweringPass.cs (1)
15RazorCodeDocument codeDocument,
Language\Components\ComponentSplatLoweringPass.cs (1)
15RazorCodeDocument codeDocument,
Language\Components\ComponentTemplateDiagnosticPass.cs (1)
19RazorCodeDocument codeDocument,
Language\Components\ComponentTildePathPass.cs (1)
39RazorCodeDocument codeDocument,
Language\Components\ComponentWhitespacePass.cs (1)
19RazorCodeDocument codeDocument,
Language\DefaultDirectiveSyntaxTreePass.cs (1)
18RazorCodeDocument codeDocument,
Language\DefaultDocumentClassifierPass.cs (2)
14protected override bool IsMatch(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) 20RazorCodeDocument codeDocument,
Language\DefaultDocumentClassifierPassFeature.cs (6)
14public IList<Action<RazorCodeDocument, ClassDeclarationIntermediateNode>> ConfigureClass { get; } = 15new List<Action<RazorCodeDocument, ClassDeclarationIntermediateNode>>(); 17public IList<Action<RazorCodeDocument, NamespaceDeclarationIntermediateNode>> ConfigureNamespace { get; } = 18new List<Action<RazorCodeDocument, NamespaceDeclarationIntermediateNode>>(); 20public IList<Action<RazorCodeDocument, MethodDeclarationIntermediateNode>> ConfigureMethod { get; } = 21new List<Action<RazorCodeDocument, MethodDeclarationIntermediateNode>>();
Language\DefaultRazorCSharpLoweringPhase.cs (2)
13protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
Language\DefaultRazorDeclCSharpLoweringPhase.cs (3)
21protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken) 37var declCodeDocument = codeDocument.GetTagHelperRewrittenSyntaxTree() is null
Language\DefaultRazorDirectiveClassifierPhase.cs (2)
18protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
Language\DefaultRazorDocumentClassifierPhase.cs (2)
18protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
Language\DefaultRazorIntermediateNodeLoweringPhase.cs (2)
36protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
Language\DefaultRazorMarkupSplitPhase.cs (3)
33protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken) 105RazorCodeDocument RouteToFallbackDiscovery(DocumentIntermediateNode? shellDecl)
Language\DefaultRazorOptimizationPhase.cs (2)
18protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
Language\DefaultRazorParsingPhase.cs (2)
19protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
Language\DefaultRazorSyntaxTreePhase.cs (2)
18protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
Language\DefaultRazorTagHelperContextDiscoveryPhase_Pooling.cs (1)
31RazorCodeDocument codeDocument,
Language\DefaultRazorTagHelperContextDiscoveryPhase.cs (2)
19protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
Language\DefaultRazorTagHelperRewritePhase.cs (2)
11protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
Language\DefaultTagHelperResolutionPhase.cs (2)
35protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
Language\DirectiveRemovalOptimizationPass.cs (1)
14RazorCodeDocument codeDocument,
Language\DocumentClassifierPassBase.cs (5)
31RazorCodeDocument codeDocument, 55private void Rewrite(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) 100protected abstract bool IsMatch(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode); 103protected virtual CodeTarget CreateTarget(RazorCodeDocument codeDocument) 110RazorCodeDocument codeDocument,
Language\Extensions\AttributeDirectivePass.cs (1)
13RazorCodeDocument codeDocument,
Language\Extensions\DefaultMetadataIdentifierFeature.cs (1)
16public string GetIdentifier(RazorCodeDocument codeDocument, RazorSourceDocument sourceDocument)
Language\Extensions\DefaultTagHelperOptimizationPass.cs (1)
18RazorCodeDocument codeDocument,
Language\Extensions\EliminateMethodBodyPass.cs (1)
16RazorCodeDocument codeDocument,
Language\Extensions\FunctionsDirectivePass.cs (1)
17RazorCodeDocument codeDocument,
Language\Extensions\IMetadataIdentifierFeature.cs (2)
16/// <param name="codeDocument">The <see cref="RazorCodeDocument"/>.</param> 19string GetIdentifier(RazorCodeDocument codeDocument, RazorSourceDocument sourceDocument);
Language\Extensions\ImplementsDirectivePass.cs (1)
15RazorCodeDocument codeDocument,
Language\Extensions\InheritsDirectivePass.cs (1)
13RazorCodeDocument codeDocument,
Language\Extensions\MetadataAttributePass.cs (1)
25RazorCodeDocument codeDocument,
Language\Extensions\PreallocatedTagHelperAttributeOptimizationPass.cs (1)
16RazorCodeDocument codeDocument,
Language\Extensions\SectionDirectivePass.cs (1)
13RazorCodeDocument codeDocument,
Language\Extensions\ViewCssScopePass.cs (1)
16RazorCodeDocument codeDocument,
Language\HtmlNodeOptimizationPass.cs (1)
14RazorCodeDocument codeDocument,
Language\IntermediateNodePassBase.cs (2)
25RazorCodeDocument codeDocument, 38RazorCodeDocument codeDocument,
Language\IRazorDirectiveClassifierPass.cs (1)
14RazorCodeDocument codeDocument,
Language\IRazorDocumentClassifierPass.cs (1)
14RazorCodeDocument codeDocument,
Language\IRazorEnginePhase.cs (2)
13RazorCodeDocument Execute(RazorCodeDocument codeDocument, CancellationToken cancellationToken = default);
Language\IRazorOptimizationPass.cs (1)
14RazorCodeDocument codeDocument,
Language\IRazorSyntaxTreePass.cs (1)
14RazorCodeDocument codeDocument,
Language\NamespaceComputer.cs (2)
20RazorCodeDocument codeDocument, 181RazorCodeDocument codeDocument,
Language\RazorCodeDocument.cs (14)
78public static RazorCodeDocument Create( 84public static RazorCodeDocument Create( 122internal RazorCodeDocument WithTagHelpers(TagHelperCollection? value) 143internal RazorCodeDocument WithReferencedTagHelpers(TagHelperCollection value) 164internal RazorCodeDocument WithSyntaxTree(RazorSyntaxTree value) 186internal RazorCodeDocument WithTagHelperRewrittenSyntaxTree(RazorSyntaxTree value) 211internal RazorCodeDocument WithImportSyntaxTrees(ImmutableArray<RazorSyntaxTree> value) 235internal RazorCodeDocument WithTagHelperContext(TagHelperDocumentContext value) 258internal RazorCodeDocument WithDocumentNode(DocumentIntermediateNode value) 271internal RazorCodeDocument WithUnresolvedDocumentNode(DocumentIntermediateNode value) 287internal RazorCodeDocument WithImplCSharpDocument(RazorCSharpDocument value) 297internal RazorCodeDocument WithDeclCSharpDocument(RazorCSharpDocument value) 310internal RazorCodeDocument WithDirectiveTagHelperContributions(ImmutableArray<DirectiveTagHelperContribution> value) 339static void VerifyNamespace(RazorCodeDocument codeDocument, bool fallbackToRootNamespace, bool considerImports, string? @namespace)
Language\RazorCodeDocumentExtensions.cs (8)
25public static RazorCSharpDocument GetCSharpDocument(this RazorCodeDocument codeDocument) 28public static bool TryComputeClassName(this RazorCodeDocument codeDocument, [NotNullWhen(true)] out string? className) 42this RazorCodeDocument codeDocument, 48this RazorCodeDocument codeDocument, 54internal static bool IsImportsFile(this RazorCodeDocument codeDocument) 62internal static string? GetInheritsDirectiveValue(this RazorCodeDocument codeDocument) 121internal static ImmutableArray<string> GetUsingDirectives(this RazorCodeDocument codeDocument) 170internal static bool IsDirectiveUsed(this RazorCodeDocument codeDocument, BaseRazorDirectiveSyntax directive)
Language\RazorCSharpDocument.cs (2)
14public RazorCodeDocument CodeDocument { get; } 39RazorCodeDocument codeDocument,
Language\RazorCSharpDocumentWriter.cs (1)
21RazorCodeDocument codeDocument,
Language\RazorEngine.cs (3)
35public RazorCodeDocument Process(RazorCodeDocument codeDocument, CancellationToken cancellationToken = default) 39var currentDocument = codeDocument;
Language\RazorEngineFeatureBase.cs (1)
49Resources.FormatFeatureDependencyMissing(GetType().Name, typeof(T).Name, nameof(RazorCodeDocument)));
Language\RazorEnginePhaseBase.cs (5)
32public RazorCodeDocument Execute(RazorCodeDocument codeDocument, CancellationToken cancellationToken = default) 57Resources.FormatPhaseDependencyMissing(GetType().Name, typeof(T).Name, nameof(RazorCodeDocument))); 65protected abstract RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken);
Language\RazorHtmlWriter.cs (1)
39public static RazorHtmlDocument GetHtmlDocument(RazorCodeDocument codeDocument)
Language\RazorProjectEngine.cs (16)
61public RazorCodeDocument Process(RazorProjectItem projectItem, CancellationToken cancellationToken = default) 65var codeDocument = CreateCodeDocumentCore(projectItem); 69public RazorCodeDocument Process( 79var codeDocument = CreateCodeDocumentCore(source, fileKind, importSources, tagHelpers, cssScope: null, configureParser: null, configureCodeGeneration: null); 83public RazorCodeDocument ProcessDeclarationOnly(RazorProjectItem projectItem, CancellationToken cancellationToken = default) 87var codeDocument = CreateCodeDocumentCore(projectItem, configureParser: null, configureCodeGeneration: (builder) => 95public RazorCodeDocument ProcessDeclarationOnly( 105var codeDocument = CreateCodeDocumentCore(source, fileKind, importSources, tagHelpers, cssScope: null, configureParser: null, configureCodeGeneration: (builder) => 113internal RazorCodeDocument CreateCodeDocument(RazorProjectItem projectItem) 120internal RazorCodeDocument CreateCodeDocument( 132private RazorCodeDocument CreateCodeDocumentCore( 144private RazorCodeDocument CreateCodeDocumentCore( 156var codeDocument = RazorCodeDocument.Create(source, importSources, parserOptions, codeGenerationOptions); 195private RazorCodeDocument ProcessCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
Language\RazorProjectEngineExtensions.cs (9)
12public static RazorCodeDocument CreateCodeDocument(this RazorProjectEngine projectEngine, RazorSourceDocument source) 15public static RazorCodeDocument CreateCodeDocument(this RazorProjectEngine projectEngine, RazorSourceDocument source, RazorFileKind fileKind) 18public static RazorCodeDocument CreateCodeDocument( 24public static RazorCodeDocument CreateCodeDocument( 31public static RazorCodeDocument CreateCodeDocument( 37public static RazorCodeDocument CreateCodeDocument( 44public static RazorCodeDocument CreateCodeDocument( 51public static RazorCodeDocument CreateCodeDocument( 59private static RazorCodeDocument CreateCodeDocumentCore(
Language\TagHelperDocumentContext.cs (1)
9/// The binding information for Tag Helpers resulted to a <see cref="RazorCodeDocument"/>. Represents the
Mvc.Version1_X\MvcViewDocumentClassifierPass.cs (2)
15protected override bool IsMatch(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) => true; 18RazorCodeDocument codeDocument,
Mvc.Version2_X\AssemblyAttributeInjectionPass.cs (1)
19RazorCodeDocument codeDocument,
Mvc.Version2_X\InstrumentationPass.cs (1)
18RazorCodeDocument codeDocument,
Mvc.Version2_X\MvcViewDocumentClassifierPass.cs (2)
15protected override bool IsMatch(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) => true; 18RazorCodeDocument codeDocument,
Mvc.Version2_X\NamespaceDirective.cs (1)
44RazorCodeDocument codeDocument,
Mvc.Version2_X\PagesPropertyInjectionPass.cs (1)
14RazorCodeDocument codeDocument,
Mvc.Version2_X\RazorPageDocumentClassifierPass.cs (4)
42protected override bool IsMatch(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) 48RazorCodeDocument codeDocument, 110private void EnsureValidPageDirective(RazorCodeDocument codeDocument, PageDirective pageDirective) 125var leadingDirectiveCodeDocument = LeadingDirectiveParsingEngine.CreateCodeDocument(codeDocument.Source);
Mvc\CreateNewOnMetadataUpdateAttributePass.cs (1)
19RazorCodeDocument codeDocument,
Mvc\InjectDirective.cs (1)
48RazorCodeDocument codeDocument,
Mvc\ModelDirective.cs (1)
79RazorCodeDocument codeDocument,
Mvc\ModelExpressionPass.cs (1)
17RazorCodeDocument codeDocument,
Mvc\MvcViewDocumentClassifierPass.cs (2)
17protected override bool IsMatch(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) => true; 27RazorCodeDocument codeDocument,
Mvc\PagesPropertyInjectionPass.cs (1)
14RazorCodeDocument codeDocument,
Mvc\RazorPageDocumentClassifierPass.cs (4)
51protected override bool IsMatch(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) 57RazorCodeDocument codeDocument, 129private void EnsureValidPageDirective(RazorCodeDocument codeDocument, PageDirective pageDirective) 144var leadingDirectiveCodeDocument = LeadingDirectiveParsingEngine.CreateCodeDocument(codeDocument.Source);
Mvc\ViewComponentTagHelperPass.cs (1)
19RazorCodeDocument codeDocument,
SourceGenerators\RazorGeneratorResult.cs (2)
9internal sealed class RazorGeneratorResult(TagHelperCollection tagHelpers, ImmutableDictionary<string, (string hintName, RazorCodeDocument document)> filePathToDocument, ImmutableDictionary<string, string> hintNameToFilePath) 13public RazorCodeDocument? GetCodeDocument(string physicalPath) => filePathToDocument.TryGetValue(physicalPath, out var pair) ? pair.document : null;
SourceGenerators\RazorSourceGenerator.cs (2)
382var codeDocument = item.Item3.CodeDocument; 512using var filePathToDocument = new PooledDictionaryBuilder<string, (string, RazorCodeDocument)>();
SourceGenerators\RazorSourceGenerator.Helpers.cs (2)
105RazorCodeDocument codeDocument, 120var declCodeDocument = codeDocument.GetTagHelperRewrittenSyntaxTree() is null
SourceGenerators\SourceGeneratorProjectEngine.cs (8)
59var codeDocument = _projectEngine.CreateCodeDocument(projectItem); 83var codeDocument = sgDocument.CodeDocument; 122RazorCodeDocument ResolveTagHelpers(RazorCodeDocument codeDocument) 191var codeDocument = sgDocument.CodeDocument; 205private static RazorCodeDocument ExecutePhases(ReadOnlySpan<IRazorEnginePhase> phases, RazorCodeDocument codeDocument, CancellationToken cancellationToken) 207var currentDocument = codeDocument;
SourceGenerators\SourceGeneratorRazorCodeDocument.cs (5)
11/// A wrapper for <see cref="RazorCodeDocument"/> 14/// The razor compiler modifies the <see cref="RazorCodeDocument"/> in place during the various phases, 18/// returned unchanged. Rather than implementing deep equality on the <see cref="RazorCodeDocument"/> 23internal sealed class SourceGeneratorRazorCodeDocument(RazorCodeDocument razorCodeDocument) 25public RazorCodeDocument CodeDocument { get; } = razorCodeDocument;
rzc (1)
GenerateCommand.cs (1)
472var codeDocument = engine.Process(engine.FileSystem.GetItem(inputItem.FilePath, inputItem.FileKind));