Skip to content

Commit dcfc2fb

Browse files
committed
Rename ReadOnly to UseSubStream
1 parent 599096c commit dcfc2fb

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/LibObjectFile.Tests/Elf/ElfSimpleTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static void CheckInvalidLib(TestContext testContext, bool isReadOnly)
9393
{
9494
testContext.WriteLine($"TestThrows ReadOnly: {isReadOnly}");
9595
using var stream = File.OpenRead("TestFiles/cmnlib.b00");
96-
Assert.IsFalse(ElfFile.TryRead(stream, out var elf, out var diagnostics, new ElfReaderOptions() { ReadOnly = isReadOnly }));
96+
Assert.IsFalse(ElfFile.TryRead(stream, out var elf, out var diagnostics, new ElfReaderOptions() { UseSubStream = isReadOnly }));
9797
Assert.IsNotNull(elf);
9898
foreach (var message in diagnostics.Messages)
9999
{

src/LibObjectFile/Elf/ElfReader.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private protected ElfReader(ElfFile file, Stream stream, ElfReaderOptions reader
2828
/// </summary>
2929
public ElfReaderOptions Options { get; }
3030

31-
public override bool KeepOriginalStreamForSubStreams => Options.ReadOnly;
31+
public override bool KeepOriginalStreamForSubStreams => Options.UseSubStream;
3232

3333
public ElfSectionLink ResolveLink(ElfSectionLink link, string errorMessageFormat)
3434
{

src/LibObjectFile/Elf/ElfReaderOptions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class ElfReaderOptions
1515
/// Gets or sets a boolean indicating if the stream can be used in read-only mode, or <c>false</c> the resulting
1616
/// <see cref="ElfFile"/> will be modified.
1717
/// </summary>
18-
public bool ReadOnly { get; set; }
18+
public bool UseSubStream { get; set; }
1919

2020
/// <summary>
2121
/// Gets or sets a delegate that can be used to replace the creation of <see cref="ElfNote"/> when

src/objdasm/ObjDisasmApp.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void Run()
5656
}
5757
else if (ElfFile.IsElf(stream))
5858
{
59-
var elfObjectFile = ElfFile.Read(stream, new ElfReaderOptions() {ReadOnly = true});
59+
var elfObjectFile = ElfFile.Read(stream, new ElfReaderOptions() {UseSubStream = true});
6060
ProcessElf(Path.GetFileName(file), elfObjectFile);
6161
}
6262
}

0 commit comments

Comments
 (0)