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.

LanguageData

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

object LanguageData { get; set; }

Property Value

System.Object:

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

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.

Properties

Gets the dictionary containing custom properties for this object.

PropertyDictionary Properties { get; }

Property Value

PropertyDictionary:

The dictionary containing custom properties for this object.

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 System.EventHandler<SyntaxLanguageChangedEventArgs>

The delegate handler.

priority EventHandlerPriority

A EventHandlerPriority specifying the priority level.

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.

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

System.Collections.Generic.IList<TService>:

The list of available services of the specified type.

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.

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 System.EventHandler<SyntaxLanguageChangedEventArgs>

The delegate handler.

priority EventHandlerPriority

A EventHandlerPriority specifying the priority level.

Events

LanguageChanged

Occurs after the value of the Language property has changed.

event EventHandler<SyntaxLanguageChangedEventArgs> LanguageChanged

Event Type

System.EventHandler<SyntaxLanguageChangedEventArgs>

ParseDataChanged

Occurs after the value of the ParseData property has changed.

event EventHandler<ParseDataPropertyChangedEventArgs> ParseDataChanged

Event Type

System.EventHandler<ParseDataPropertyChangedEventArgs>

Inherited Members

See Also