API Browser

Class

Document

class Document

Namespace: Raven.CodeAnalysis
Assembly: Raven.CodeAnalysis.dll
Source file: Document.cs

Inheritance: Object → Document

Represents a source document within a project. Acts as a facade over immutable Raven.CodeAnalysis.DocumentInfo data and is owned by a Raven.CodeAnalysis.Document.Project.

Properties

8 items
FilePath: string? The path to the document on disk if any.
Id: DocumentId The identifier for this document.
Name: string The name of the document.
Project: Project The project that contains this document.
Solution: Solution The solution that owns this document.
SupportsSemanticModel: bool Indicates whether this document can produce a semantic model.
SupportsSyntaxTree: bool Indicates whether this document can produce a syntax tree.
Version: VersionStamp The current version of the text.

Methods

14 items
Equals(obj: object?) -> bool Determines whether the specified object is equal to the current object. Inherited from Object.Equals
GetExpandedSyntaxRootAsync(cancellationToken?: CancellationToken) -> Task<CompilationUnitSyntax?> Asynchronously gets the expanded syntax root for this document, if supported.
GetHashCode() -> int Serves as the default hash function. Inherited from Object.GetHashCode
GetSemanticModelAsync(cancellationToken?: CancellationToken) -> Task<SemanticModel?> Asynchronously gets the semantic model for this document, if supported.
GetSemanticModelAsync(position: int, cancellationToken?: CancellationToken) -> Task<SemanticModel?> Asynchronously gets the semantic model that owns an authored position in this document.
GetSyntaxTreeAsync(cancellationToken?: CancellationToken) -> Task<SyntaxTree?> Asynchronously gets the syntax tree of the document, if any.
GetTextAsync(cancellationToken?: CancellationToken) -> Task<SourceText> Asynchronously gets the text of the document.
GetTextChangesAsync(oldDocument: Document, cancellationToken?: CancellationToken) -> Task<IReadOnlyList<TextChange>> Gets the text changes between this document and the specified old document.
GetTextVersionAsync(cancellationToken?: CancellationToken) -> Task<VersionStamp> Asynchronously gets the version of the document's text.
GetType() -> Type Gets the System.Type of the current instance. Inherited from Object.GetType
Extension member: SaveDocument(filePath: string) -> () No summary available. Extension from PersistenceExtensions.SaveDocument
ToString() -> string? Returns a string that represents the current object. Inherited from Object.ToString
WithSyntaxRoot(root: SyntaxNode) -> Document Creates a new document with the specified syntax root.
WithText(newText: SourceText) -> Document Creates a new document with updated text using the owning solution.