fix(scriptanalysis): mirror WaitAsync/WaitForAsync on CompileAttributeAccessor
Adds the four missing overloads (value + predicate × WaitAsync + WaitForAsync) to CompileAttributeAccessor so template/call scripts that use Attributes.WaitAsync or Attributes.WaitForAsync pass design-time Roslyn validation. Covers both root scope and composed/child scope (Children["x"].Attributes.WaitAsync) automatically since CompileCompositionAccessor.Attributes already returns CompileAttributeAccessor.
This commit is contained in:
@@ -185,6 +185,14 @@ public sealed class ScriptCompileSurface
|
||||
|
||||
/// <summary>Mirrors <c>AttributeAccessor.Resolve</c>.</summary>
|
||||
public string Resolve(string key) => throw new NotSupportedException(CompileOnly);
|
||||
|
||||
/// <summary>Mirrors <c>AttributeAccessor.WaitAsync</c>.</summary>
|
||||
public Task<bool> WaitAsync(string key, object? targetValue, TimeSpan timeout, bool requireGoodQuality = false) => throw new NotSupportedException(CompileOnly);
|
||||
public Task<bool> WaitAsync(string key, Func<object?, bool> predicate, TimeSpan timeout, bool requireGoodQuality = false) => throw new NotSupportedException(CompileOnly);
|
||||
|
||||
/// <summary>Mirrors <c>AttributeAccessor.WaitForAsync</c>.</summary>
|
||||
public Task<WaitResult> WaitForAsync(string key, object? targetValue, TimeSpan timeout, bool requireGoodQuality = false) => throw new NotSupportedException(CompileOnly);
|
||||
public Task<WaitResult> WaitForAsync(string key, Func<object?, bool> predicate, TimeSpan timeout, bool requireGoodQuality = false) => throw new NotSupportedException(CompileOnly);
|
||||
}
|
||||
|
||||
/// <summary>Compile-only mirror of <c>ChildrenAccessor</c>.</summary>
|
||||
|
||||
Reference in New Issue
Block a user