BlazorConfig
Default conventions and behavior used by ServiceStack.Blazor Components
Assembly: ServiceStack.Blazor.dll
View Source
public class BlazorConfig
Properties
Instance
View Source
public static BlazorConfig Instance { get; }
Services
IOC used to resolve App dependencies (e.g. ILoggerFactory)
View Source
public IServiceProvider? Services { get; set; }
Log
Custom ILogger for Blazor Components to use (default uses ILoggerFactory)
View Source
public ILogger? Log { get; set; }
IsWasm
Flag App can use to detect if running in Blazor WASM or Blazor Server
View Source
public bool IsWasm { get; set; }
DarkMode
Whether Components should be rendered in Dark Mode
View Source
public bool DarkMode { get; }
EnableErrorLogging
Enable Error Logging (default true)
View Source
public bool EnableErrorLogging { get; set; }
EnableVerboseLogging
Enable Verbose Logging (default false)
View Source
public bool EnableVerboseLogging { get; set; }
EnableLogging
Enable Verbose Logging (default false)
View Source
public bool EnableLogging { get; set; }
MaxFieldLength
Max Field Length in Format components (default 150)
View Source
public int MaxFieldLength { get; set; }
MaxNestedFields
Max Number of Fields in Format components (default 2)
View Source
public int MaxNestedFields { get; set; }
MaxNestedFieldLength
Max Field Length in Nested Types in Format components (default 30)
View Source
public int MaxNestedFieldLength { get; set; }
RedirectSignIn
Sign In Page to redirect for Unauthorized access to protected compontents (default /signin)
View Source
public string RedirectSignIn { get; set; }
UseLocalStorage
Whether to Register ILocalStorage with AddBlazorApiClient()
View Source
public bool UseLocalStorage { get; set; }
DefaultProfileUrl
Image URI to use when No ProfileUrl exists
View Source
public string DefaultProfileUrl { get; set; }
DefaultTableIcon
View Source
public ImageInfo DefaultTableIcon { get; set; }
ApiBaseUrl
Capture the Server Api BaseUrl
View Source
public string ApiBaseUrl { get; set; }
AssetsBasePath
Prefix added to relative Asset URLs
View Source
public string AssetsBasePath { get; set; }
FallbackAssetsBasePath
Prefix used to add to fallback URLs when default Asset Path fails
View Source
public string FallbackAssetsBasePath { get; set; }
AssetsPathResolver
Use custom strategy for resolving Asset Paths
View Source
public Func<string, string> AssetsPathResolver { get; set; }
FallbackPathResolver
Use custom strategy for resolving Fallback Asset Paths
View Source
public Func<string, string> FallbackPathResolver { get; set; }
UseInProcessClient
Whether ApiAsync BlazorComponentBase APIs should use IServiceGateway instead of JsonApiClient in Blazor Server by default
View Source
public bool UseInProcessClient { get; set; }
AutoQueryGridDefaults
Change defaults for AutoQueryGrid Components
View Source
public AutoQueryGridDefaults AutoQueryGridDefaults { get; set; }
JSParseObject
Function used to parse JS Object literals
View Source
public Func<string, Dictionary<string, object>> JSParseObject { get; set; }
EvalExpression
Function used to evaluate script expressions in Inputs
View Source
public Func<string, object> EvalExpression { get; set; }
FormatJsonOptions
View Source
public JsonSerializerOptions FormatJsonOptions { get; set; }
DefaultFilters
Default Filter Conventions to use in DataGrid (for non AutoQuery APIs)
View Source
public List<AutoQueryConvention> DefaultFilters { get; set; }
OnApiErrorAsync
View Source
public Func<object, IHasErrorStatus, Task>? OnApiErrorAsync { get; set; }
Methods
Set(BlazorConfig)
View Source
public static void Set(BlazorConfig config)
Parameters
Type | Name |
---|---|
ServiceStack.Blazor.BlazorConfig | config |
GetLog()
View Source
public ILogger? GetLog()
Returns
System.Nullable<ILogger>
DefaultAssetsPathResolver(String)
View Source
public static string DefaultAssetsPathResolver(string path)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | path |
DefaultFallbackPathResolver(String)
View Source
public static string DefaultFallbackPathResolver(string path)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | path |
DefaultJSObjectParser(String)
View Source
public static Dictionary<string, object> DefaultJSObjectParser(string js)
Returns
Dictionary<System.String,System.Object>
Parameters
Type | Name |
---|---|
System.String | js |
ToggleDarkMode(Nullable<Boolean>)
View Source
public bool ToggleDarkMode(bool? value = null)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Nullable<System.Boolean> | value |