Auto: twincat-4.1 — nested UDT browse via online type walker
Closes #315
This commit is contained in:
@@ -361,9 +361,18 @@ internal class FakeTwinCATClient : ITwinCATClient
|
||||
public List<TwinCATDiscoveredSymbol> BrowseResults { get; } = new();
|
||||
public bool ThrowOnBrowse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// PR 4.1 / #315 — captures the most recent <c>maxArrayExpansion</c> the driver passed
|
||||
/// so tests can assert the option threaded through. Defaults to <c>-1</c> until the
|
||||
/// first browse call; <c>0</c> would be a meaningful (degenerate) caller value.
|
||||
/// </summary>
|
||||
public int LastBrowseMaxArrayExpansion { get; private set; } = -1;
|
||||
|
||||
public virtual async IAsyncEnumerable<TwinCATDiscoveredSymbol> BrowseSymbolsAsync(
|
||||
int maxArrayExpansion,
|
||||
[EnumeratorCancellation] CancellationToken cancellationToken)
|
||||
{
|
||||
LastBrowseMaxArrayExpansion = maxArrayExpansion;
|
||||
if (ThrowOnBrowse) throw Exception ?? new InvalidOperationException("fake browse failure");
|
||||
await Task.CompletedTask;
|
||||
foreach (var sym in BrowseResults)
|
||||
|
||||
Reference in New Issue
Block a user