Class CodeParserBuffer
Internal buffer for reading asynchronously from files
Inheritance
System.Object
CodeParserBuffer
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: DuetAPI.Commands
Assembly: DuetAPI.dll
Syntax
public sealed class CodeParserBuffer
Constructors
CodeParserBuffer(Int32, Boolean)
Default constructor of this class
Declaration
public CodeParserBuffer(int bufferSize, bool lineNumbersValid)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | bufferSize | How many bytes to buffer when reading from a file |
System.Boolean | lineNumbersValid | Indicates if line numbers are valid |
Fields
LineNumber
Current line number
Declaration
public long? LineNumber
Field Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
MayRepeatCode
Indicates if the last code may be repeated as per Fanuc or LaserWeb style
Declaration
public bool MayRepeatCode
Field Value
Type | Description |
---|---|
System.Boolean |
Methods
GetPosition(StreamReader)
Get the actual byte position when reading from a stream
Declaration
public long GetPosition(StreamReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.IO.StreamReader | reader | Reader to read from |
Returns
Type | Description |
---|---|
System.Int64 | Actual position in bytes |
Invalidate()
Invalidate the buffer
Declaration
public void Invalidate()