Skip to content

Commit

Permalink
[dotnet] Making SlowLoadableComponent more exentsible
Browse files Browse the repository at this point in the history
Fixes issue #9009
  • Loading branch information
jimevans committed Oct 12, 2021
1 parent 54aba4c commit 5632da3
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion dotnet/src/support/UI/SlowLoadableComponent{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@ public TimeSpan SleepInterval
set { this.sleepInterval = value; }
}

/// <summary>
/// Gets the timeout interval before which this component must be considered loaded.
/// </summary>
protected TimeSpan Timeout
{
get { return this.timeout; }
}

/// <summary>
/// Gets the clock object providing timing for monitoring the load status of this component.
/// </summary>
protected IClock Clock
{
get { return this.clock; }
}

/// <summary>
/// Ensures that the component is currently loaded.
/// </summary>
Expand Down Expand Up @@ -125,7 +141,10 @@ protected virtual void HandleErrors()
// no-op by default
}

private void Wait()
/// <summary>
/// Waits between polls of the load status of this component.
/// </summary>
protected virtual void Wait()
{
Thread.Sleep(this.sleepInterval);
}
Expand Down

0 comments on commit 5632da3

Please sign in to comment.