ApiComponentBase
The Base class for all ResponseStatus aware ServiceStack.Blazor Components
Assembly: ServiceStack.Blazor.dll
View Source
public abstract class ApiComponentBase : UiComponentBase
Properties
Status
Directly assing a Response Status to this component
View Source
public ResponseStatus? Status { get; set; }
CascadingStatus
The ResponseStatus injected by CascadingValue
View Source
public ResponseStatus? CascadingStatus { get; set; }
UseStatus
The ResponseStatus assinged to this compontent
View Source
protected ResponseStatus? UseStatus { get; }
ExplicitStatus
Assign ResponseStatus to component and ignore CascadingStatus injected by CascadingValue
View Source
public ResponseStatus? ExplicitStatus { get; set; }
IgnoreCascadingStatus
Whether to ignore CascadingStatus
View Source
protected bool IgnoreCascadingStatus { get; set; }
IsError
If the ResponseStatus assigned to this component is in an Error State
View Source
protected bool IsError { get; }
Inherited Properties
class
Optional user defined classes for this component
View Source
public string class { get; set; }
Class
View Source
public string Class { get; }
JS
View Source
public IJSRuntime JS { get; set; }
Methods
StateClasses(String, String)
Helper to return classes for when component is in a valid
or invalid
state
View Source
protected virtual string StateClasses(string valid = null, string invalid = null)
Returns
System.String
Parameters
Type | Name | Description |
---|---|---|
System.String | valid | css classes to include when valid |
|
| System.String
| invalid | css classes to include when invalid
|
CssClass(String, String)
Return any user-defined classes along with optional classes for when component is in a valid
or invalid
state
View Source
protected override string CssClass(string valid = null, string invalid = null)
Returns
System.String
Parameters
Type | Name | Description |
---|---|---|
System.String | valid | css classes to include when valid |
|
| System.String
| invalid | css classes to include when invalid
|
Inherited Methods
ClassNames(String[])
Helper to combine multiple css classes. Strings can contain multiple classes, empty strings are ignored.
View Source
protected virtual string ClassNames(params string[] classes)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String[] | classes |
CssClass(String, String)
Return any user-defined classes along with optional classes for when component is in a valid
or invalid
state
View Source
protected virtual string CssClass(string valid = null, string invalid = null)
Returns
System.String
Parameters
Type | Name | Description |
---|---|---|
System.String | valid | css classes to include when valid |
|
| System.String
| invalid | css classes to include when invalid
|
OnAfterRenderAsync(Boolean)
View Source
protected override async Task OnAfterRenderAsync(bool firstRender)
Returns
Task
Parameters
Type | Name |
---|---|
System.Boolean | firstRender |
QueueRenderAction(Func<IJSRuntime, Task>)
View Source
protected virtual void QueueRenderAction(Func<IJSRuntime, Task> action)
Parameters
Type | Name |
---|---|
Func<IJSRuntime,Task> | action |
SanitizeAttribute(String)
View Source
public static bool SanitizeAttribute(string name)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | name |
SanitizeAttributes(Nullable<IReadOnlyDictionary<String, Object>>)
View Source
public static IReadOnlyDictionary<string, object>? SanitizeAttributes(IReadOnlyDictionary<string, object>? attrs)
Returns
System.Nullable<IReadOnlyDictionary<System.String,System.Object>>
Parameters
Type | Name |
---|---|
System.Nullable<IReadOnlyDictionary<System.String,System.Object>> | attrs |
SetTitle(String)
Set the document.title
View Source
protected virtual void SetTitle(string title)
Parameters
Type | Name |
---|---|
System.String | title |