Class ReactiveComponentBase
Represents the base class for a reactive component in a Blazor application.
Inheritance
Implements
Inherited Members
Namespace: PoeShared.Blazor
Assembly: PoeShared.Blazor.dll
Syntax
public abstract class ReactiveComponentBase : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IReactiveComponent, IDisposable, INotifyPropertyChanged, IRefreshableComponent, IAsyncDisposable
Constructors
| Name | Description |
|---|---|
| ReactiveComponentBase() | Initializes a new instance of the ReactiveComponentBase class. |
Properties
| Name | Description |
|---|---|
| Anchors | Gets the collection of disposables for this component. |
| ComponentId | Gets the unique identifier for the reactive component. |
| IsComponentInitialized | Indicates whether the component is initialized. Set after the first OnInitialized call. |
| IsComponentLoaded | Indicates whether the component is loaded. Set after the first OnParametersSet call. |
| IsComponentRendered | Indicates whether the component is rendered. Set after the first OnAfterRender call. |
| Log | Gets the logger for this component. |
| Name | Gets or sets the name of the component. |
| RefreshCount | Gets the total count of refreshes that have occurred. |
| RefreshPeriod | Gets or sets the refresh period for the component. |
| RefreshRequestCount | Gets the count of refresh requests that have been made. Not all of them will be served - throttling/sampling, filtering, etc. |
| RenderCount | Gets the total count of successful renders that have occurred. |
| RenderOnlyWhenChanged | Controls rendering process - if set, StateHasChanged will be called only when there is at least one change detected either by ChangeDetector or manually |
| ShouldRenderCount | Gets the total count of ShouldRender requests that have occurred. |
| WhenRefresh | Gets the subject that triggers when the component should refresh. |
Methods
| Name | Description |
|---|---|
| AddAfterRenderTask(Func<Task>) | |
| AddAfterRenderValueTask(Func<ValueTask>) | |
| BuildRenderTree(RenderTreeBuilder) | |
| Dispose() | Disposes of the resources used by this component. |
| DisposeAsync() | |
| OnAfterFirstRender() | Method invoked first time the component has been rendered. Note that the component does not automatically re-render after the completion of any returned Task, because that would cause an infinite render loop. |
| OnAfterFirstRenderAsync() | Method invoked first time the component has been rendered. Note that the component does not automatically re-render after the completion of any returned Task, because that would cause an infinite render loop. |
| OnAfterRender(bool) | |
| OnAfterRenderAsync(bool) | |
| OnInitialized() | |
| OnInitializedAsync() | |
| OnParametersSet() | |
| OnParametersSetAsync() | |
| PrepareLogger() | Prepares the logger for this component. |
| RaiseAndSetIfChanged<TRet>(ref TRet, TRet, string) | Raises a property changed event if the specified field is changed. Sets the field to the new value if changed. |
| RaiseAndSet<TRet>(ref TRet, TRet, string) | |
| RaisePropertyChanged(string) | Raises the PropertyChanged event for a given property. |
| Refresh(object) | Refreshes the component state, equivalent of StateHasChanged but with additional information about reason(if possible). |
| SetParametersAsync(ParameterView) | |
| ShouldRender() |
Events
| Name | Description |
|---|---|
| PropertyChanged |