In This Article

PythonSyntaxLanguage Class

Represents a Python syntax language definition.

public class PythonSyntaxLanguage : SyntaxLanguage, ISyntaxLanguage, IKeyedObject, IServiceLocator, ICodeDocumentLifecycleEventSink, ICodeDocumentPropertyChangeEventSink
Inheritance:
Object SyntaxLanguage Object
Implements:
ISyntaxLanguage IKeyedObject IServiceLocator ICodeDocumentLifecycleEventSink ICodeDocumentPropertyChangeEventSink

Constructors

PythonSyntaxLanguage(PythonVersion)

Initializes a new instance of the PythonSyntaxLanguage class.

public PythonSyntaxLanguage(PythonVersion version = PythonVersion.Version3)
Parameter Type Description
version PythonVersion

The PythonVersion that indicates the Python version supported by this language.

Properties

Version

Gets the PythonVersion that indicates the Python version supported by this language.

public PythonVersion Version { get; }

Property Value

PythonVersion:

The PythonVersion that indicates the Python version supported by this language.

Methods

OnDocumentAttached(ICodeDocument)

Occurs when the specified ICodeDocument is attached to the language.

protected virtual void OnDocumentAttached(ICodeDocument document)
Parameter Type Description
document ICodeDocument

The ICodeDocument that is attached.

OnDocumentDetached(ICodeDocument)

Occurs when the specified ICodeDocument is detached from the language.

protected virtual void OnDocumentDetached(ICodeDocument document)
Parameter Type Description
document ICodeDocument

The ICodeDocument that is attached.

OnDocumentFileNameChanged(ICodeDocument, StringPropertyChangedEventArgs)

Occurs after the FileName property is changed on an ICodeDocument that uses this language.

protected virtual void OnDocumentFileNameChanged(ICodeDocument document, StringPropertyChangedEventArgs e)
Parameter Type Description
document ICodeDocument

The ICodeDocument whose FileName property is changed.

e StringPropertyChangedEventArgs

The StringPropertyChangedEventArgs that contains the event data.

OnDocumentParseDataChanged(ICodeDocument, ParseDataPropertyChangedEventArgs)

Occurs after the ParseData property is changed on an ICodeDocument that uses this language.

protected virtual void OnDocumentParseDataChanged(ICodeDocument document, ParseDataPropertyChangedEventArgs e)
Parameter Type Description
document ICodeDocument

The ICodeDocument whose ParseData property is changed.

e ParseDataPropertyChangedEventArgs

The ParseDataPropertyChangedEventArgs that contains the event data.

Explicit Interface Implementations

ICodeDocumentLifecycleEventSink.NotifyDocumentAttached(ICodeDocument)

Occurs when the specified ICodeDocument is attached to a language.

void ICodeDocumentLifecycleEventSink.NotifyDocumentAttached(ICodeDocument document)
Parameter Type Description
document ICodeDocument

The ICodeDocument that is attached.

ICodeDocumentLifecycleEventSink.NotifyDocumentDetached(ICodeDocument)

Occurs when the specified ICodeDocument is detached from a language.

void ICodeDocumentLifecycleEventSink.NotifyDocumentDetached(ICodeDocument document)
Parameter Type Description
document ICodeDocument

The ICodeDocument that is detached.

ICodeDocumentPropertyChangeEventSink.NotifyFileNameChanged(ICodeDocument, StringPropertyChangedEventArgs)

Occurs after the value of the FileName property has changed.

void ICodeDocumentPropertyChangeEventSink.NotifyFileNameChanged(ICodeDocument document, StringPropertyChangedEventArgs e)
Parameter Type Description
document ICodeDocument

The ICodeDocument whose FileName property is changed.

e StringPropertyChangedEventArgs

The StringPropertyChangedEventArgs that contains the event data.

ICodeDocumentPropertyChangeEventSink.NotifyParseDataChanged(ICodeDocument, ParseDataPropertyChangedEventArgs)

Occurs after the value of the ParseData property has changed.

void ICodeDocumentPropertyChangeEventSink.NotifyParseDataChanged(ICodeDocument document, ParseDataPropertyChangedEventArgs e)
Parameter Type Description
document ICodeDocument

The ICodeDocument whose ParseData property is changed.

e ParseDataPropertyChangedEventArgs

The ParseDataPropertyChangedEventArgs that contains the event data.

Inherited Members

Extension Methods