Class ParseDocumentParams
The parameter object for a ParseDocumentCommand. The [Method] attribute lets
the JSON-RPC layer infer the request method when the caller sends this by type.
[Method("rdcore/parser/document", Direction.ClientToServer)]
public record ParseDocumentParams : IRequest, IRequest<Unit>, IRequest<PlatformJsonEnvelope>, IBaseRequest, IEquatable<ParseDocumentParams>
- Inheritance
-
ParseDocumentParams
- Implements
-
IRequestIRequest<Unit>IRequest<PlatformJsonEnvelope>IBaseRequest
- Inherited Members
Remarks
The response is a PlatformJsonEnvelope wrapping a ModuleParseResult — the AST is polymorphic and the JSON-RPC transport's serializer cannot round-trip it (see PlatformJson).
Properties
AnchorOffset
The position of the fragment in the source document.
public SourcePosition AnchorOffset { get; init; }
Property Value
Remarks
- This property is ignored if a
DocumentUriis specified. - Anchor offset is
L0C0unless specified otherwise.
DocumentUri
The Uri of the document to parse.
public Uri? DocumentUri { get; init; }
Property Value
Fragment
The fragment of source code to parse.
public string? Fragment { get; init; }
Property Value
Remarks
An AnchorOffset should also be specified.