IMultilanguageFormattingInfoSplitRegions Method |
Splits the source code into language regions.
Namespace:
Ookii.FormatC
Assembly:
Ookii.FormatC (in Ookii.FormatC.dll) Version: 2.1.0
Syntax IEnumerable<LanguageRegion> SplitRegions(
string code,
int index,
int length
)
Function SplitRegions (
code As String,
index As Integer,
length As Integer
) As IEnumerable(Of LanguageRegion)
IEnumerable<LanguageRegion^>^ SplitRegions(
String^ code,
int index,
int length
)
abstract SplitRegions :
code : string *
index : int *
length : int -> IEnumerable<LanguageRegion>
Parameters
- code
- Type: SystemString
The code. - index
- Type: SystemInt32
The index in the code to start at. - length
- Type: SystemInt32
The number of characters from index to process.
Return Value
Type:
IEnumerableLanguageRegionA list of language regions.
Remarks
The identified regions may themselves contain multiple languages if the formatter
specified for that region supports IMultilanguageFormattingInfo. The
exception is if the FormattingInfo property is
in which case the current formatter will be used, and the region will not be split again.
For example, an XML literal in Visual Basic can contain embedded expressions with VB code.
The VB formatter doesn't need to identify the embedded expressions; the XML formatter will
do that.
See Also