7 instantiations of RazorSourceDocument
Microsoft.CodeAnalysis.Razor.Compiler (7)
Language\RazorSourceDocument.cs (7)
67return new RazorSourceDocument(sourceText, properties); 91return new RazorSourceDocument(sourceText, properties); 119return new RazorSourceDocument(sourceText, properties); 154return new RazorSourceDocument(sourceText, RazorSourceDocumentProperties.Create(filePath, relativePath)); 219return new RazorSourceDocument(sourceText, properties); 247return new RazorSourceDocument(sourceText, properties); 268return new RazorSourceDocument(text, properties);
150 references to RazorSourceDocument
Microsoft.CodeAnalysis.Razor.Compiler (150)
Language\CodeGeneration\CodeRenderingContext.cs (2)
16public RazorSourceDocument SourceDocument { get; } 36RazorSourceDocument sourceDocument,
Language\DefaultImportProjectItem.cs (2)
13private RazorSourceDocument? _source; 24internal override RazorSourceDocument GetSource()
Language\DefaultRazorCSharpLoweringPhase.cs (1)
108var sourceDocument = _context.SourceDocument;
Language\DefaultRazorIntermediateNodeLoweringPhase.cs (1)
331public RazorSourceDocument SourceDocument { get; set; }
Language\DefaultRazorParsingPhase.cs (3)
13private static readonly ConditionalWeakTable<RazorSourceDocument, RazorSyntaxTree> s_importTrees = new(); 26foreach (var import in codeDocument.Imports) 68static bool TryGetCachedImportTree(RazorSourceDocument import, RazorParserOptions options, [NotNullWhen(true)] out RazorSyntaxTree? tree)
Language\DefaultRazorTagHelperContextDiscoveryPhase.cs (2)
81private RazorSourceDocument? _source; 90protected RazorSourceDocument Source => _source.AssumeNotNull();
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (6)
68RazorSourceDocument sourceDocument) 76RazorSourceDocument sourceDocument) 91RazorSourceDocument sourceDocument, 141RazorSourceDocument sourceDocument, 190RazorSourceDocument sourceDocument) 323RazorSourceDocument sourceDocument)
Language\DefaultTagHelperResolutionPhase.cs (10)
71var sourceDocument = codeDocument.Source; 96public readonly RazorSourceDocument SourceDocument; 99public ResolutionContext(RazorSourceDocument sourceDocument, DocumentIntermediateNode documentNode) 840RazorSourceDocument sourceDocument) 876RazorSourceDocument sourceDocument) 915RazorSourceDocument sourceDocument) 1216RazorSourceDocument sourceDocument, 1263RazorSourceDocument sourceDocument) 1305RazorSourceDocument sourceDocument); 1313RazorSourceDocument sourceDocument);
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (16)
22RazorSourceDocument sourceDocument) 30RazorSourceDocument sourceDocument) 40RazorSourceDocument sourceDocument, 116RazorSourceDocument sourceDocument, 206RazorSourceDocument sourceDocument) 265RazorSourceDocument sourceDocument) 336RazorSourceDocument sourceDocument) 450private static void ConvertValueChildren(IntermediateNode targetNode, HtmlAttributeIntermediateNode htmlAttr, bool isBoundStringProperty, RazorSourceDocument sourceDocument) 532private static void ConvertDynamicNonStringValueChildren(IntermediateNode targetNode, HtmlAttributeIntermediateNode htmlAttr, RazorSourceDocument sourceDocument) 559private static void ConvertMixedLiteralAndExpressionValue(IntermediateNode targetNode, HtmlAttributeIntermediateNode htmlAttr, RazorSourceDocument sourceDocument) 718private static void ConvertPureCSharpExpressionValue(IntermediateNode targetNode, HtmlAttributeIntermediateNode htmlAttr, RazorSourceDocument sourceDocument) 1251RazorSourceDocument sourceDocument) 1309RazorSourceDocument sourceDocument) 1413RazorSourceDocument sourceDocument) 1428RazorSourceDocument sourceDocument) 1488RazorSourceDocument sourceDocument)
Language\Extensions\DefaultMetadataIdentifierFeature.cs (1)
16public string GetIdentifier(RazorCodeDocument codeDocument, RazorSourceDocument sourceDocument)
Language\Extensions\IMetadataIdentifierFeature.cs (4)
9/// A <see cref="IRazorEngineFeature"/> that can calculate the identifier for a <see cref="RazorSourceDocument"/>. 14/// Gets the identifier for a <see cref="RazorSourceDocument"/>. 17/// <param name="sourceDocument">The <see cref="RazorSourceDocument"/>.</param> 19string GetIdentifier(RazorCodeDocument codeDocument, RazorSourceDocument sourceDocument);
Language\Extensions\MetadataAttributePass.cs (1)
126foreach (var import in codeDocument.Imports)
Language\Legacy\ClassifiedSpanVisitor.cs (2)
21private RazorSourceDocument _source = null!; 32private void Initialize(RazorSourceDocument source)
Language\Legacy\ParserContext.cs (2)
16public RazorSourceDocument SourceDocument { get; } 28public ParserContext(RazorSourceDocument source, RazorParserOptions options, CancellationToken cancellationToken = default)
Language\Legacy\RazorParser.cs (1)
24public virtual RazorSyntaxTree Parse(RazorSourceDocument source, CancellationToken cancellationToken = default)
Language\Legacy\SeekableTextReader.cs (1)
23public SeekableTextReader(RazorSourceDocument source) : this(source.Text, source.FilePath)
Language\Legacy\TagHelperBlockRewriter.cs (1)
66RazorSourceDocument source)
Language\Legacy\TagHelperParseTreeRewriter.cs (6)
56RazorSourceDocument source, 67private readonly RazorSourceDocument _source = source; 698RazorSourceDocument source) 716RazorSourceDocument source) 729private static SourceLocation GetStartTagDeclarationErrorStart(MarkupStartTagSyntax tagBlock, RazorSourceDocument source) 734private static SourceLocation GetEndTagDeclarationErrorStart(MarkupEndTagSyntax tagBlock, RazorSourceDocument source)
Language\Legacy\TagHelperSpanVisitor.cs (2)
12private readonly RazorSourceDocument _source; 15private TagHelperSpanVisitor(RazorSourceDocument source, ImmutableArray<TagHelperSpanInternal>.Builder spans)
Language\NamespaceComputer.cs (1)
219private RazorSourceDocument? _source;
Language\RazorCodeDocument.cs (7)
17public RazorSourceDocument Source { get; } 18public ImmutableArray<RazorSourceDocument> Imports { get; } 41RazorSourceDocument source, 42ImmutableArray<RazorSourceDocument> imports, 73RazorSourceDocument source, 79RazorSourceDocument source, 80ImmutableArray<RazorSourceDocument> imports,
Language\RazorHtmlWriter.cs (3)
21private readonly RazorSourceDocument _source; 32private RazorHtmlWriter(RazorSourceDocument source, CodeWriter codeWriter) 41var source = codeDocument.Source;
Language\RazorProjectEngine.cs (13)
70RazorSourceDocument source, 72ImmutableArray<RazorSourceDocument> importSources, 96RazorSourceDocument source, 98ImmutableArray<RazorSourceDocument> importSources, 121RazorSourceDocument source, 123ImmutableArray<RazorSourceDocument> importSources, 137var source = projectItem.GetSource(); 145RazorSourceDocument source, 147ImmutableArray<RazorSourceDocument> importSources, 416private ImmutableArray<RazorSourceDocument> GetImportSources(RazorProjectItem projectItem) 430internal static ImmutableArray<RazorSourceDocument> GetImportSourceDocuments( 433using var imports = new PooledArrayBuilder<RazorSourceDocument>(importItems.Count); 440var sourceDocument = importItem.GetSource();
Language\RazorProjectEngineExtensions.cs (14)
12public static RazorCodeDocument CreateCodeDocument(this RazorProjectEngine projectEngine, RazorSourceDocument source) 15public static RazorCodeDocument CreateCodeDocument(this RazorProjectEngine projectEngine, RazorSourceDocument source, RazorFileKind fileKind) 20RazorSourceDocument source, 21ImmutableArray<RazorSourceDocument> importSources) 26RazorSourceDocument source, 28ImmutableArray<RazorSourceDocument> importSources) 33RazorSourceDocument source, 39RazorSourceDocument source, 46RazorSourceDocument source, 47ImmutableArray<RazorSourceDocument> importSources, 53RazorSourceDocument source, 55ImmutableArray<RazorSourceDocument> importSources, 61RazorSourceDocument source, 63ImmutableArray<RazorSourceDocument> importSources = default,
Language\RazorProjectItem.cs (2)
122internal virtual RazorSourceDocument GetSource() 123=> RazorSourceDocument.ReadFrom(this);
Language\RazorSourceDocument.cs (33)
53/// Reads the <see cref="RazorSourceDocument"/> from the specified <paramref name="stream"/>. 57/// <returns>The <see cref="RazorSourceDocument"/>.</returns> 58public static RazorSourceDocument ReadFrom(Stream stream, string fileName) 71/// Reads the <see cref="RazorSourceDocument"/> from the specified <paramref name="stream"/>. 76/// <returns>The <see cref="RazorSourceDocument"/>.</returns> 77public static RazorSourceDocument ReadFrom(Stream stream, string fileName, Encoding encoding) 95/// Reads the <see cref="RazorSourceDocument"/> from the specified <paramref name="stream"/>. 99/// <param name="properties">Properties to configure the <see cref="RazorSourceDocument"/>.</param> 100/// <returns>The <see cref="RazorSourceDocument"/>.</returns> 101public static RazorSourceDocument ReadFrom(Stream stream, Encoding encoding, RazorSourceDocumentProperties properties) 123/// Reads the <see cref="RazorSourceDocument"/> from the specified <paramref name="projectItem"/>. 126/// <returns>The <see cref="RazorSourceDocument"/>.</returns> 127public static RazorSourceDocument ReadFrom(RazorProjectItem projectItem) 159/// Creates a <see cref="RazorSourceDocument"/> from the specified <paramref name="content"/>. 162/// <param name="fileName">The file name of the <see cref="RazorSourceDocument"/>.</param> 163/// <returns>The <see cref="RazorSourceDocument"/>.</returns> 165public static RazorSourceDocument Create(string content, string fileName) 177/// Creates a <see cref="RazorSourceDocument"/> from the specified <paramref name="content"/>. 180/// <param name="properties">Properties to configure the <see cref="RazorSourceDocument"/>.</param> 181/// <returns>The <see cref="RazorSourceDocument"/>.</returns> 183public static RazorSourceDocument Create(string content, RazorSourceDocumentProperties properties) 199/// Creates a <see cref="RazorSourceDocument"/> from the specified <paramref name="content"/>. 202/// <param name="fileName">The file name of the <see cref="RazorSourceDocument"/>.</param> 204/// <returns>The <see cref="RazorSourceDocument"/>.</returns> 205public static RazorSourceDocument Create(string content, string fileName, Encoding encoding) 223/// Creates a <see cref="RazorSourceDocument"/> from the specified <paramref name="content"/>. 227/// <param name="properties">Properties to configure the <see cref="RazorSourceDocument"/>.</param> 228/// <returns>The <see cref="RazorSourceDocument"/>.</returns> 229public static RazorSourceDocument Create(string content, Encoding encoding, RazorSourceDocumentProperties properties) 251/// Creates a <see cref="RazorSourceDocument"/> from the specified <paramref name="text"/>. 254/// <param name="properties">Properties to configure the <see cref="RazorSourceDocument"/>.</param> 255/// <returns>The <see cref="RazorSourceDocument"/>.</returns> 256public static RazorSourceDocument Create(SourceText text, RazorSourceDocumentProperties properties)
Language\RazorSourceDocumentProperties.cs (1)
7/// Use to configure optional properties for creating a <see cref="RazorSourceDocument"/>.
Language\RazorSyntaxTree.cs (3)
16public RazorSourceDocument Source { get; } 23RazorSourceDocument source, 74RazorSourceDocument source,
Language\SpanComputer.cs (1)
94public readonly SourceSpan ToSourceSpan(RazorSourceDocument source)
Language\Syntax\SyntaxNodeExtensions.cs (5)
43public static SourceLocation GetSourceLocation(this SyntaxNodeOrToken nodeOrToken, RazorSourceDocument source) 48public static SourceLocation GetSourceLocation(this SyntaxNode node, RazorSourceDocument source) 83public static SourceLocation GetSourceLocation(this SyntaxToken token, RazorSourceDocument source) 118public static SourceSpan GetSourceSpan(this SyntaxNode node, RazorSourceDocument source) 126public static SourceSpan GetSourceSpan(this SyntaxToken token, RazorSourceDocument source)
SourceGenerators\SourceGeneratorProjectItem.cs (3)
15private readonly RazorSourceDocument? _source; 35_source = RazorSourceDocument.Create(text, RazorSourceDocumentProperties.Create(AdditionalText.Path, relativePhysicalPath)); 59internal override RazorSourceDocument? GetSource() => _source;