In This Article

ParseRequest Class

Represents a request for a parsing operation.

public class ParseRequest : IParseRequest
Inheritance:
object object
Implements:
IParseRequest

Constructors

ParseRequest(string, ITextBufferReader, ISyntaxLanguage, IParseTarget?)

Initializes an instance of the class.

public ParseRequest(string sourceKey, ITextBufferReader textBufferReader, ISyntaxLanguage language, IParseTarget? parseTarget)
Parameter Type Description
sourceKey string

A text key, typically a filename, that uniquely identifies the text to parse.

textBufferReader ITextBufferReader

The ITextBufferReader that contains the text to parse.

language ISyntaxLanguage

The ISyntaxLanguage for which this parse request was created.

parseTarget IParseTarget

An IParseTarget indicating the object that will receive the results of the parse.

ParseRequest(string, ITextBufferReader, IParser, IParseTarget?)

Initializes an instance of the class.

public ParseRequest(string sourceKey, ITextBufferReader textBufferReader, IParser parser, IParseTarget? parseTarget)
Parameter Type Description
sourceKey string

A text key, typically a filename, that uniquely identifies the text to parse.

textBufferReader ITextBufferReader

The ITextBufferReader that contains the text to parse.

parser IParser

The IParser that will perform the parsing operation.

parseTarget IParseTarget

An IParseTarget indicating the object that will receive the results of the parse.

Properties

CreatedDateTime

The DateTime at which the parse request was created.

public DateTime CreatedDateTime { get; }

Property Value

DateTime

Language

The ISyntaxLanguage for which this parse request was created.

public ISyntaxLanguage? Language { get; }

Property Value

ISyntaxLanguage

ParseHashKey

A hash key that uniquely identifies the parse request for a source/target combination.

public string ParseHashKey { get; }

Property Value

string

Parser

The IParser that will perform the parsing operation.

public IParser Parser { get; }

Property Value

IParser

Priority

An integer value describing the priority of the request, where a higher number has a higher priority.

public int Priority { get; set; }

Property Value

int:

The default value is ParseRequest.MediumPriority.

RepeatedRequestPause

The number of milliseconds to pause if there are repeated attempts for this same request.

public int RepeatedRequestPause { get; set; }

Property Value

int:

The default value is 250.

Snapshot

The ITextSnapshot, if available, for which the parse request was created.

public ITextSnapshot? Snapshot { get; set; }

Property Value

ITextSnapshot

SourceKey

A text key, typically a filename, that uniquely identifies the text to parse.

public string SourceKey { get; }

Property Value

string

State

The current state of the request.

public ParseRequestState State { get; set; }

Property Value

ParseRequestState

Remarks

This property should only be set by a IParseRequestDispatcher.

Tag

The object that contains user-defined data about the object.

public object? Tag { get; set; }

Property Value

object

Target

The IParseTarget that will be notified once the parsing operation is complete.

public IParseTarget? Target { get; }

Property Value

IParseTarget

TextBufferReader

The ITextBufferReader used to read the text that should be parsed.

public ITextBufferReader TextBufferReader { get; }

Property Value

ITextBufferReader

Methods

GetParseHashKey(ICodeDocument)

Returns the ParseHashKey to use for the specified ICodeDocument.

public static string GetParseHashKey(ICodeDocument document)
Parameter Type Description
document ICodeDocument

The ICodeDocument to examine.

Returns

string

Fields

HighPriority

Specifies a high priority.

public const int HighPriority = 300

LowPriority

Specifies a low priority.

public const int LowPriority = 100

MediumPriority

Specifies a medium priority.

public const int MediumPriority = 200

Inherited Members

Extension Methods