In This Article

ISourceFileCollection Interface

Provides the base requirements for a collection of ISourceFile objects.

public interface ISourceFileCollection : IKeyedObservableCollection<ISourceFile>, IObservableCollection<ISourceFile>

Methods

Add(string, CompilationUnit)

Adds an ISourceFile for the specified CompilationUnit to the collection.

ISourceFile Add(string sourceFileKey, CompilationUnit compilationUnit)
Parameter Type Description
sourceFileKey string

The unique key that identifies the source file, which is generally a full file path or GUID.

compilationUnit CompilationUnit

The CompilationUnit to examine.

Returns

ISourceFile:

The ISourceFile that was added.

QueueCode(ISyntaxLanguage, string, string)

Queues parsing for the specified source code, and adds an ISourceFile for the result.

void QueueCode(ISyntaxLanguage language, string sourceFileKey, string text)
Parameter Type Description
language ISyntaxLanguage

The ISyntaxLanguage containing an IParser service that will be used to parse the source code.

sourceFileKey string

The unique key that identifies the source file, which is generally a full file path or GUID.

text string

A string containing the source code to parse.

Remarks

The parsing operation will occur in a worker thread and will not block the calling thread as long as an Dispatcher has been configured.

QueueFile(ISyntaxLanguage, string)

Queues parsing for the specified file, and adds an ISourceFile for the result.

void QueueFile(ISyntaxLanguage language, string path)
Parameter Type Description
language ISyntaxLanguage

The ISyntaxLanguage containing an IParser service that will be used to parse the file.

path string

The absolute path of the file to load.

Remarks

The parsing operation will occur in a worker thread and will not block the calling thread as long as an Dispatcher has been configured.

Inherited Members