Skip to main content

BlazorUtils

Also extend functionality to any class implementing IHasJsonApiClient

Assembly: ServiceStack.Blazor.dll
View Source
Declaration
public static class BlazorUtils

Fields

nextId

View Source
Declaration
public static int nextId

Methods

NextId()

View Source
Declaration
public static int NextId()
Returns

System.Int32

LogError(String, Object[])

View Source
Declaration
public static void LogError(string message, params object[] args)
Parameters
TypeName
System.Stringmessage
System.Object[]args

LogError(Exception, String, Object[])

View Source
Declaration
public static void LogError(Exception ex, string message, params object[] args)
Parameters
TypeName
Exceptionex
System.Stringmessage
System.Object[]args

Log(String)

View Source
Declaration
public static void Log(string message)
Parameters
TypeName
System.Stringmessage

LogDebug(String)

View Source
Declaration
public static void LogDebug(string message)
Parameters
TypeName
System.Stringmessage

FormatValue(Object)

View Source
Declaration
public static string FormatValue(object value)
Returns

System.String

Parameters
TypeName
System.Objectvalue

FormatValue(Object, Int32)

View Source
Declaration
public static string FormatValue(object value, int maxFieldLength)
Returns

System.String

Parameters
TypeName
System.Objectvalue
System.Int32maxFieldLength

FormatValueAsHtml(Object)

View Source
Declaration
public static string FormatValueAsHtml(object Value)
Returns

System.String

Parameters
TypeName
System.ObjectValue

SupportsProperty(MetadataPropertyType)

View Source
Declaration
public static bool SupportsProperty(MetadataPropertyType prop)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.MetadataPropertyTypeprop

OnApiErrorAsync(Object, IHasErrorStatus)

View Source
Declaration
public static async Task OnApiErrorAsync(object requestDto, IHasErrorStatus apiError)
Returns

Task

Parameters
TypeName
System.ObjectrequestDto
IHasErrorStatusapiError

ManagedApiAsync<TResponse>(IServiceGateway, IReturn<TResponse>)

View Source
Declaration
public static async Task<ApiResult<TResponse>> ManagedApiAsync<TResponse>(this IServiceGateway client, IReturn<TResponse> request)
Returns

Task<ServiceStack.ApiResult<<TResponse>>>

Parameters
TypeName
IServiceGatewayclient
IReturn<<TResponse>>request
Type Parameters
  • TResponse

ManagedApiAsync(IServiceGateway, IReturnVoid)

View Source
Declaration
public static async Task<ApiResult<EmptyResponse>> ManagedApiAsync(this IServiceGateway client, IReturnVoid request)
Returns

Task<ServiceStack.ApiResult<EmptyResponse>>

Parameters
TypeName
IServiceGatewayclient
IReturnVoidrequest

ManagedApiAsync<Model>(IServiceGateway, Object)

View Source
Declaration
public static async Task<IHasErrorStatus> ManagedApiAsync<Model>(this IServiceGateway client, object request)
Returns

Task<IHasErrorStatus>

Parameters
TypeName
IServiceGatewayclient
System.Objectrequest
Type Parameters
  • Model

ManagedApiFormAsync<Model>(IServiceGatewayFormAsync, Object, MultipartFormDataContent)

View Source
Declaration
public static async Task<ApiResult<Model>> ManagedApiFormAsync<Model>(this IServiceGatewayFormAsync client, object requestDto, MultipartFormDataContent formData)
Returns

Task<ServiceStack.ApiResult<<Model>>>

Parameters
TypeName
ServiceStack.IServiceGatewayFormAsyncclient
System.ObjectrequestDto
MultipartFormDataContentformData
Type Parameters
  • Model

ApiAppMetadataAsync(IServiceGateway)

View Source
Declaration
public static async Task<ApiResult<AppMetadata>> ApiAppMetadataAsync(this IServiceGateway client)
Returns

Task<ServiceStack.ApiResult<ServiceStack.AppMetadata>>

Parameters
TypeName
IServiceGatewayclient

ManagedSendAsync<TResponse>(IServiceGateway, IReturn<TResponse>)

View Source
Declaration
public static async Task<TResponse> ManagedSendAsync<TResponse>(this IServiceGateway client, IReturn<TResponse> request)
Returns

Task<<TResponse>>

Parameters
TypeName
IServiceGatewayclient
IReturn<<TResponse>>request
Type Parameters
  • TResponse