In This Article

ICodeDocument Interface

Provides the base requirements for a text document with some advanced features that relate to syntax highlighting and code parsing.

public interface ICodeDocument : IParseTarget, ITextDocument

Properties

Language

Gets or sets the ISyntaxLanguage that is currently loaded.

ISyntaxLanguage Language { get; set; }

Property Value

ISyntaxLanguage:

The ISyntaxLanguage that is currently loaded.

Remarks

The default value is a plain text language.

See Also

LanguageData

Gets or sets an object that specifies document-specific data for the Language that is loaded.

object LanguageData { get; set; }

Property Value

object:

An object that specifies document-specific data for the Language that is loaded.

See Also

ParseData

Gets or sets the syntax/semantic parse data that has been assigned to this document as a result of a parsing operation.

IParseData ParseData { get; set; }

Property Value

IParseData:

The syntax/semantic parse data that has been assigned to this document as a result of a parsing operation.

See Also

Properties

Gets the dictionary containing custom properties for this object.

PropertyDictionary Properties { get; }

Property Value

PropertyDictionary:

The dictionary containing custom properties for this object.

See Also

Methods

AddLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs>, EventHandlerPriority)

Adds an event handler for the LanguageChanged event using the specified priority level.

void AddLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs> handler, EventHandlerPriority priority)
Parameter Type Description
handler EventHandler<SyntaxLanguageChangedEventArgs>

The delegate handler.

priority EventHandlerPriority

A EventHandlerPriority specifying the priority level.

See Also

CreateTagAggregator<T>()

Creates a new ITagAggregator<T> that collects the tag results from all ITagger<T> instances associated with this document.

ITagAggregator<T> CreateTagAggregator<T>() where T : ITag
Type Parameters:
T -

The type of ITag associated with this aggregator.

Returns

ITagAggregator<T>:

The ITagAggregator<T> that was created.

See Also

GetServices<TService>()

Returns a list of available services of the specified type.

IList<TService> GetServices<TService>() where TService : class
Type Parameters:
TService -

The type of service.

Returns

IList<TService>:

The list of available services of the specified type.

See Also

QueueParseRequest()

Queues up a parse request for the document with the ambient dispatcher.

void QueueParseRequest()

Remarks

If AmbientParseRequestDispatcherProvider does not provide a dispatcher, the parsing operation is completed immediately in the calling thread.

See Also

RemoveLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs>, EventHandlerPriority)

Removes an event handler for the LanguageChanged event using the specified priority level.

void RemoveLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs> handler, EventHandlerPriority priority)
Parameter Type Description
handler EventHandler<SyntaxLanguageChangedEventArgs>

The delegate handler.

priority EventHandlerPriority

A EventHandlerPriority specifying the priority level.

See Also

Events

LanguageChanged

Occurs after the value of the Language property has changed.

event EventHandler<SyntaxLanguageChangedEventArgs> LanguageChanged

Event Type

EventHandler<SyntaxLanguageChangedEventArgs>

See Also

ParseDataChanged

Occurs after the value of the ParseData property has changed.

event EventHandler<ParseDataPropertyChangedEventArgs> ParseDataChanged

Event Type

EventHandler<ParseDataPropertyChangedEventArgs>

See Also

Inherited Members

See Also