Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ namespace AXSharp.Presentation.Blazor.Controls.RenderableContent
public partial class RenderableContentControl : ComponentBase, IDisposable
{
private string _presentation;


/// <summary>
/// Gets or sets polling interval for this control and nested controls.
/// [!NOTE] Nested element can have different polling setting that will override this property.
/// </summary>
[Parameter] public int PollingInterval { get; set; } = 250;

/// <summary>
/// Parameter Context accept ITwinElement instance, which is used as base model for UI generation.
Expand Down Expand Up @@ -87,6 +92,7 @@ protected override void OnInitialized()
try
{
_context = (ITwinElement)Context;
_context.StartPolling(this.PollingInterval);
}
catch
{
Expand Down Expand Up @@ -368,6 +374,7 @@ private string GetDisplayPresentationIfEmpty()

public virtual void Dispose()
{
_context?.StopPolling();
_viewModelCache.ResetCounter();
}
}
Expand Down