Class ParsePointManager
Represents a class that contains the list of ParsePoints and manages it.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Edit.Implementation.IO
Assembly: Syncfusion.Edit.Windows.dll
Syntax
public class ParsePointManager : IEnumerable, IDisposable
Constructors
ParsePointManager()
Initializes a new instance of the ParsePointManager class.
Declaration
public ParsePointManager()
Properties
Count
Gets the count of parse points.
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
Methods
CheckIntegrity()
Checks integrity of the internal list of parsepoints.
Declaration
public bool CheckIntegrity()
Returns
Type | Description |
---|---|
System.Boolean | True if everything is OK. Otherwise it returns false. |
CreateNewParsePoint(Int32, Int32, Int64)
Creates new ParsePoint object and weak reference to it.
Declaration
protected ParsePoint CreateNewParsePoint(int iLine, int iPosition, long lOffset)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iLine | Line for the new ParsePoint. |
System.Int32 | iPosition | Position for new ParsePoint. |
System.Int64 | lOffset | Offset for new ParsePoint. |
Returns
Type | Description |
---|---|
Syncfusion.Windows.Forms.Edit.Implementation.IO.ParsePoint | WeakParsePoint instance with newly created ParsePoint as it`s Target. |
Dispose()
Releases all resources used by all parse points.
Declaration
public void Dispose()
GetEnumerator()
Gets the enumerator for all parse points.
Declaration
public IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | Enumerator for array. |
GetEnumerator(IParsePoint)
Gets the enumerator for the specified range of parse points.
Declaration
public IEnumerator GetEnumerator(IParsePoint start)
Parameters
Type | Name | Description |
---|---|---|
IParsePoint | start | ParsePoint of the range start. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | Enumerator for array. |
GetEnumerator(IParsePoint, IParsePoint)
Gets the enumerator for the specified range of parse points.
Declaration
public IEnumerator GetEnumerator(IParsePoint start, IParsePoint end)
Parameters
Type | Name | Description |
---|---|---|
IParsePoint | start | ParsePoint of the range start. |
IParsePoint | end | ParsePoint of the range end. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | Enumerator for array. |
GetEnumerator(Int32, Int32)
Gets the enumerator for the specified range of parse points.
Declaration
public IEnumerator GetEnumerator(int start, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | start | Start index. |
System.Int32 | count | Count of ParsePoints. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | Enumerator for array. |
GetNearestParsePoints(Int32, Int32, out IParsePoint, out IParsePoint)
Looks for the nearest ParsePoints for the given position.
Declaration
public bool GetNearestParsePoints(int Line, int Column, out IParsePoint LeftPoint, out IParsePoint RightPoint)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Line | Positions line |
System.Int32 | Column | Positions column |
IParsePoint | LeftPoint | Returns left nearest point |
IParsePoint | RightPoint | Returns right nearest point |
Returns
Type | Description |
---|---|
System.Boolean | Returns false if there is no parsepoints at all, otherwise returns true |
GetNearestParsePoints(Int32, Int32, out Int32, out Int32)
Looks for the nearest ParsePoints for the given position.
Declaration
public bool GetNearestParsePoints(int Line, int Column, out int LeftPointIndex, out int RightPointIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Line | Positions line |
System.Int32 | Column | Positions column |
System.Int32 | LeftPointIndex | Index of the left nearest point |
System.Int32 | RightPointIndex | Index of the right nearest point |
Returns
Type | Description |
---|---|
System.Boolean | Returns false if there is no parsepoints at all, otherwise returns true |
GetNearestParsePoints(Int64, out IParsePoint, out IParsePoint)
Looks for the nearest ParsePoints for the given offset.
Declaration
public bool GetNearestParsePoints(long StreamOffset, out IParsePoint LeftPoint, out IParsePoint RightPoint)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | StreamOffset | Offset in the stream |
IParsePoint | LeftPoint | Returns left nearest point |
IParsePoint | RightPoint | Returns right nearest point |
Returns
Type | Description |
---|---|
System.Boolean | Returns false if there is no parsepoints at all, otherwise returns true |
GetNearestParsePoints(Int64, out Int32, out Int32)
Looks for the nearest ParsePoints for the given offset.
Declaration
public bool GetNearestParsePoints(long StreamOffset, out int LeftPointIndex, out int RightPointIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | StreamOffset | Offset in the stream |
System.Int32 | LeftPointIndex | Index of the left nearest point |
System.Int32 | RightPointIndex | Index of the right nearest point |
Returns
Type | Description |
---|---|
System.Boolean | Returns false if there is no parsepoints at all, otherwise returns true |
GetParsePointAtPosition(Int64, Int32, Int32)
Searches for the parse point associated with given offset or creates new parse point.
Declaration
public IParsePoint GetParsePointAtPosition(long streamOffset, int defLine, int defColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | streamOffset | Needed offset in the stream. |
System.Int32 | defLine | Line, that must be set if ParsePoint is created. |
System.Int32 | defColumn | Column, that must be set if ParsePoint is created. |
Returns
Type | Description |
---|---|
IParsePoint | IParsePoint of the found/created ParsePoint. |
GetParsePointByComparer(Object, IComparer)
Looks for ParsePoint, that is left to the given value.
Declaration
public IParsePoint GetParsePointByComparer(object value, IComparer comparer)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | Value, to be found |
System.Collections.IComparer | comparer | Comparer, that is used to find needed value |
Returns
Type | Description |
---|---|
IParsePoint | ParsePoint, that is on given Value or left to it |
GetParsePointByIndex(Int32)
Returns ParsePoint by it's index in array.
Declaration
public IParsePoint GetParsePointByIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of the ParsePoint |
Returns
Type | Description |
---|---|
IParsePoint | IParsePoint interface |
InsertPointInPosition(Int64, Int32, Int32, Int32)
Creates a new parse point and inserts it to given position.
Declaration
public IParsePoint InsertPointInPosition(long streamOffset, int line, int column, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | streamOffset | Position in stream. Must be between two nearest ParsePoint`s positions. |
System.Int32 | line | ParsePoints line. No checks are done. |
System.Int32 | column | ParsePoints column. No checks are done. |
System.Int32 | index | Index, the ParsePoint is to be inserted at. |
Returns
Type | Description |
---|---|
IParsePoint | Newly created ParsePoint |
OffsetChanged(IParsePoint, Int64, Int32, Int32)
Updates offsets of all ParsePoints, starting from the given position. If data was deleted, then iBytesInserted must be negative, everything else must be positive.
Declaration
public void OffsetChanged(IParsePoint startPoint, long iBytesInserted, int iLinesInData, int iLastLineLength)
Parameters
Type | Name | Description |
---|---|---|
IParsePoint | startPoint | StartPoint, that is in position, that was moved. |
System.Int64 | iBytesInserted | Count of inserted byte (if negative, then bytes were deleted) |
System.Int32 | iLinesInData | Count of lines in inserted/deleted data |
System.Int32 | iLastLineLength | Position offset for the last line. |