BlazorComponentBase
Blazor component base
Assembly: ServiceStack.Blazor.dll
View Source
Declaration
public class BlazorComponentBase : UiComponentBase, IHasJsonApiClient
Properties
ClientFactory
View Source
Declaration
public IClientFactory ClientFactory { get; set; }
Gateway
View Source
Declaration
public IServiceGateway Gateway { get; }
Client
View Source
Declaration
public JsonApiClient Client { get; }
UseGateway
View Source
Declaration
public bool UseGateway { get; set; }
EnableLogging
View Source
Declaration
protected virtual bool EnableLogging { get; }
Inherited Properties
class
Optional user defined classes for this component
View Source
Declaration
public string class { get; set; }
Class
View Source
Declaration
public string Class { get; }
JS
View Source
Declaration
public IJSRuntime JS { get; set; }
Methods
ApiAsync<TResponse>(IReturn<TResponse>)
View Source
Declaration
public virtual Task<ApiResult<TResponse>> ApiAsync<TResponse>(IReturn<TResponse> request)
Returns
Task<ServiceStack.ApiResult<<TResponse>>>
Parameters
Type | Name |
---|---|
IReturn<<TResponse>> | request |
Type Parameters
TResponse
ApiAsync(IReturnVoid)
View Source
Declaration
public virtual Task<ApiResult<EmptyResponse>> ApiAsync(IReturnVoid request)
Returns
Task<ServiceStack.ApiResult<EmptyResponse>>
Parameters
Type | Name |
---|---|
IReturnVoid | request |
SendAsync<TResponse>(IReturn<TResponse>)
View Source
Declaration
public virtual Task<TResponse> SendAsync<TResponse>(IReturn<TResponse> request)
Returns
Task<<TResponse>>
Parameters
Type | Name |
---|---|
IReturn<<TResponse>> | request |
Type Parameters
TResponse
ApiAsync<Model>(Object)
View Source
Declaration
public virtual Task<IHasErrorStatus> ApiAsync<Model>(object request)
Returns
Task<IHasErrorStatus>
Parameters
Type | Name |
---|---|
System.Object | request |
Type Parameters
Model
ApiFormAsync<Model>(Object, MultipartFormDataContent)
View Source
Declaration
public virtual Task<ApiResult<Model>> ApiFormAsync<Model>(object requestDto, MultipartFormDataContent request)
Returns
Task<ServiceStack.ApiResult<<Model>>>
Parameters
Type | Name |
---|---|
System.Object | requestDto |
MultipartFormDataContent | request |
Type Parameters
Model
ApiAppMetadataAsync()
View Source
Declaration
public virtual Task<ApiResult<AppMetadata>> ApiAppMetadataAsync()
Returns
Task<ServiceStack.ApiResult<ServiceStack.AppMetadata>>
log(String, Object[])
View Source
Declaration
protected virtual void log(string message, params object[] args)
Parameters
Type | Name |
---|---|
System.String | message |
System.Object[] | args |
Inherited Methods
ClassNames(String[])
Helper to combine multiple css classes. Strings can contain multiple classes, empty strings are ignored.
View Source
Declaration
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
Declaration
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
Declaration
protected override async Task OnAfterRenderAsync(bool firstRender)
Returns
Task
Parameters
Type | Name |
---|---|
System.Boolean | firstRender |
QueueRenderAction(Func<IJSRuntime, Task>)
View Source
Declaration
protected virtual void QueueRenderAction(Func<IJSRuntime, Task> action)
Parameters
Type | Name |
---|---|
Func<IJSRuntime,Task> | action |
SanitizeAttribute(String)
View Source
Declaration
public static bool SanitizeAttribute(string name)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | name |
SanitizeAttributes(Nullable<IReadOnlyDictionary<String, Object>>)
View Source
Declaration
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
Declaration
protected virtual void SetTitle(string title)
Parameters
Type | Name |
---|---|
System.String | title |
Implements
ServiceStack.IHasJsonApiClient