Table of Contents

Struct FileRecordRange

Namespace
RDCore.SDK.Runtime.Abstract.Execution
Assembly
RDCore.SDK.dll

A span of an open file, in records or in bytes depending on the channel's mode — a Lock or Unlock statement's record-range (MS-VBAL §5.4.5.4).

public readonly record struct FileRecordRange : IEquatable<FileRecordRange>
Implements
Inherited Members

Remarks

Both ends are inclusive, and both are one-based, so Start is never 0 in a range a program asked for — which is what lets 0 To 0 mean EntireFile rather than being a range at all.

Constructors

FileRecordRange(long, long)

A span of an open file, in records or in bytes depending on the channel's mode — a Lock or Unlock statement's record-range (MS-VBAL §5.4.5.4).

public FileRecordRange(long Start, long End)

Parameters

Start long

The first record or byte in the span.

End long

The last record or byte in the span, inclusive.

Remarks

Both ends are inclusive, and both are one-based, so Start is never 0 in a range a program asked for — which is what lets 0 To 0 mean EntireFile rather than being a range at all.

Properties

End

The last record or byte in the span, inclusive.

public long End { get; init; }

Property Value

long

EntireFile

The whole file — what a Lock or Unlock with no record-range applies to.

public static FileRecordRange EntireFile { get; }

Property Value

FileRecordRange

IsEntireFile

Whether this is the whole file rather than a span within it.

public bool IsEntireFile { get; }

Property Value

bool

Start

The first record or byte in the span.

public long Start { get; init; }

Property Value

long