SyntaxLanguageDefinitionSerializer Class
Provides a class that can deserialize a SyntaxLanguage from XML.
public class SyntaxLanguageDefinitionSerializer
- Inheritance:
- object object
Constructors
SyntaxLanguageDefinitionSerializer()
Initializes an instance of the class.
public SyntaxLanguageDefinitionSerializer()
Properties
HighlightingStyleRegistry
The custom IHighlightingStyleRegistry that should be used.
public IHighlightingStyleRegistry? HighlightingStyleRegistry { get; set; }
Property Value
Remarks
If this property is null, the AmbientHighlightingStyleRegistry will be used.
UseBuiltInClassificationTypes
Indicates if a deserialized IClassificationType should attempt to use one of the built-in ClassificationTypes and its default IHighlightingStyle if one is available whose key matches the deserialized key.
public bool UseBuiltInClassificationTypes { get; set; }
Property Value
- bool:
trueto attempt to use ClassificationTypes; otherwise,falseto create a new IClassificationType. The default value isfalse.
Remarks
This property has no effect if the HighlightingStyleRegistry has already registered a IClassificationType with the same key.
Methods
InitializeFromFile(ISyntaxLanguage, string)
Initializes an existing ISyntaxLanguage from a language definition file.
public void InitializeFromFile(ISyntaxLanguage language, string path)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The existing ISyntaxLanguage to initialize. |
| path | string | The full path to the file. |
InitializeFromStream(ISyntaxLanguage, Stream)
Initializes an existing ISyntaxLanguage from a language definition Stream.
public void InitializeFromStream(ISyntaxLanguage language, Stream stream)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The existing ISyntaxLanguage to initialize. |
| stream | Stream | The Stream from which to load. |
LoadFromFile(string)
Loads an ISyntaxLanguage from a language definition file.
public ISyntaxLanguage? LoadFromFile(string path)
| Parameter | Type | Description |
|---|---|---|
| path | string | The full path to the file. |
Returns
LoadFromStream(Stream)
Loads an ISyntaxLanguage from a language definition Stream.
public ISyntaxLanguage LoadFromStream(Stream stream)
| Parameter | Type | Description |
|---|---|---|
| stream | Stream | The Stream from which to load. |
Returns
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()