Class ModuleBase
public abstract class ModuleBase : ComponentBase, IModuleControl
- Inheritance
-
objectComponentBaseModuleBase
- Implements
- Derived
Properties
Actions
Allows for routing by configuration rather than by convention ( comma delimited ) - defaults to using component file name
public virtual string Actions { get; }
Property Value
- string
JSRuntime
[Inject]
protected IJSRuntime JSRuntime { get; set; }
Property Value
- IJSRuntime
LoggingService
[Inject]
protected ILogService LoggingService { get; set; }
Property Value
ModuleInstance
public ModuleInstance ModuleInstance { get; }
Property Value
ModuleState
[CascadingParameter]
protected Module ModuleState { get; set; }
Property Value
PageState
[CascadingParameter]
protected PageState PageState { get; set; }
Property Value
Prerender
Specifies the prerender mode for the moudle control ie: true or false
public virtual bool? Prerender { get; }
Property Value
- bool?
RenderMode
Specifies the required render mode for the module control ie. Static,Interactive
public virtual string RenderMode { get; }
Property Value
- string
RenderModeBoundary
[Parameter]
public RenderModeBoundary RenderModeBoundary { get; set; }
Property Value
Resources
Identifies all resources in a module
public virtual List<Resource> Resources { get; set; }
Property Value
- List<Resource>
SecurityAccessLevel
Defines the security access level for this control - defaults to View
public virtual SecurityAccessLevel SecurityAccessLevel { get; set; }
Property Value
SiteState
[Inject]
protected SiteState SiteState { get; set; }
Property Value
Title
Title to display for this control - defaults to module title
public virtual string Title { get; }
Property Value
- string
UrlParameters
public Dictionary<string, string> UrlParameters { get; }
Property Value
- Dictionary<string, string>
UrlParametersTemplate
public virtual string UrlParametersTemplate { get; set; }
Property Value
- string
UseAdminContainer
Container for embedding module control - defaults to true. false will suppress the default modal UI popup behavior and render the component in the page.
public virtual bool UseAdminContainer { get; }
Property Value
- bool
logger
protected ModuleBase.Logger logger { get; }
Property Value
Methods
AddHeadContent(string)
public void AddHeadContent(string content)
Parameters
content
string
AddModuleMessage(string, MessageType)
public void AddModuleMessage(string message, MessageType type)
Parameters
message
stringtype
MessageType
AddModuleMessage(string, MessageType, string)
public void AddModuleMessage(string message, MessageType type, string position)
Parameters
message
stringtype
MessageTypeposition
string
AddScript(Resource)
public void AddScript(Resource resource)
Parameters
resource
Resource
AddUrlParameters(params object[])
public string AddUrlParameters(params object[] parameters)
Parameters
parameters
object[]
Returns
- string
ClearModuleMessage()
public void ClearModuleMessage()
ContentUrl(int)
[Obsolete("ContentUrl(int fileId) is deprecated. Use FileUrl(int fileId) instead.", false)]
public string ContentUrl(int fileid)
Parameters
fileid
int
Returns
- string
ContentUrl(int, bool)
[Obsolete("ContentUrl(int fileId, bool asAttachment) is deprecated. Use FileUrl(int fileId, bool download) instead.", false)]
public string ContentUrl(int fileid, bool asAttachment)
Parameters
fileid
intasAttachment
bool
Returns
- string
EditUrl(int, string)
public string EditUrl(int moduleId, string action)
Parameters
moduleId
intaction
string
Returns
- string
EditUrl(int, string, Dictionary<string, string>)
public string EditUrl(int moduleId, string action, Dictionary<string, string> querystring)
Parameters
moduleId
intaction
stringquerystring
Dictionary<string, string>
Returns
- string
EditUrl(int, string, string)
public string EditUrl(int moduleId, string action, string querystring)
Parameters
moduleId
intaction
stringquerystring
string
Returns
- string
EditUrl(string)
public string EditUrl(string action)
Parameters
action
string
Returns
- string
EditUrl(string, Dictionary<string, string>)
public string EditUrl(string action, Dictionary<string, string> querystring)
Parameters
action
stringquerystring
Dictionary<string, string>
Returns
- string
EditUrl(string, int, string, Dictionary<string, string>)
public string EditUrl(string path, int moduleid, string action, Dictionary<string, string> querystring)
Parameters
path
stringmoduleid
intaction
stringquerystring
Dictionary<string, string>
Returns
- string
EditUrl(string, int, string, string)
public string EditUrl(string path, int moduleid, string action, string querystring)
Parameters
path
stringmoduleid
intaction
stringquerystring
string
Returns
- string
EditUrl(string, string)
public string EditUrl(string action, string querystring)
Parameters
action
stringquerystring
string
Returns
- string
FileUrl(int)
public string FileUrl(int fileid)
Parameters
fileid
int
Returns
- string
FileUrl(int, bool)
public string FileUrl(int fileid, bool download)
Parameters
fileid
intdownload
bool
Returns
- string
FileUrl(string, string)
public string FileUrl(string folderpath, string filename)
Parameters
folderpath
stringfilename
string
Returns
- string
FileUrl(string, string, bool)
public string FileUrl(string folderpath, string filename, bool download)
Parameters
folderpath
stringfilename
stringdownload
bool
Returns
- string
GetUrlParameters(string)
public virtual Dictionary<string, string> GetUrlParameters(string template = "")
Parameters
template
string
Returns
- Dictionary<string, string>
HideProgressIndicator()
public void HideProgressIndicator()
ImageUrl(int, int, int)
public string ImageUrl(int fileid, int width, int height)
Parameters
fileid
intwidth
intheight
int
Returns
- string
ImageUrl(int, int, int, string)
public string ImageUrl(int fileid, int width, int height, string mode)
Parameters
fileid
intwidth
intheight
intmode
string
Returns
- string
ImageUrl(int, int, int, string, string, string, int, bool)
public string ImageUrl(int fileid, int width, int height, string mode, string position, string background, int rotate, bool recreate)
Parameters
fileid
intwidth
intheight
intmode
stringposition
stringbackground
stringrotate
intrecreate
bool
Returns
- string
Log(Alias, LogLevel, LogFunction, Exception, string, params object[])
public Task Log(Alias alias, LogLevel level, LogFunction function, Exception exception, string message, params object[] args)
Parameters
alias
Aliaslevel
LogLevelfunction
LogFunctionexception
Exceptionmessage
stringargs
object[]
Returns
- Task
Log(Alias, LogLevel, string, Exception, string, params object[])
public Task Log(Alias alias, LogLevel level, string function, Exception exception, string message, params object[] args)
Parameters
Returns
- Task
ModulePath()
public string ModulePath()
Returns
- string
NavigateUrl()
public string NavigateUrl()
Returns
- string
NavigateUrl(bool)
public string NavigateUrl(bool refresh)
Parameters
refresh
bool
Returns
- string
NavigateUrl(int, string)
public string NavigateUrl(int moduleId, string action)
Parameters
moduleId
intaction
string
Returns
- string
NavigateUrl(int, string, Dictionary<string, string>)
public string NavigateUrl(int moduleId, string action, Dictionary<string, string> querystring)
Parameters
moduleId
intaction
stringquerystring
Dictionary<string, string>
Returns
- string
NavigateUrl(int, string, string)
public string NavigateUrl(int moduleId, string action, string querystring)
Parameters
moduleId
intaction
stringquerystring
string
Returns
- string
NavigateUrl(string)
public string NavigateUrl(string path)
Parameters
path
string
Returns
- string
NavigateUrl(string, bool)
public string NavigateUrl(string path, bool refresh)
Parameters
path
stringrefresh
bool
Returns
- string
NavigateUrl(string, Dictionary<string, string>)
public string NavigateUrl(string path, Dictionary<string, string> querystring)
Parameters
path
stringquerystring
Dictionary<string, string>
Returns
- string
NavigateUrl(string, int, string)
public string NavigateUrl(string path, int moduleId, string action)
Parameters
path
stringmoduleId
intaction
string
Returns
- string
NavigateUrl(string, int, string, Dictionary<string, string>)
public string NavigateUrl(string path, int moduleId, string action, Dictionary<string, string> querystring)
Parameters
path
stringmoduleId
intaction
stringquerystring
Dictionary<string, string>
Returns
- string
NavigateUrl(string, int, string, string)
public string NavigateUrl(string path, int moduleId, string action, string querystring)
Parameters
path
stringmoduleId
intaction
stringquerystring
string
Returns
- string
NavigateUrl(string, string)
public string NavigateUrl(string path, string querystring)
Parameters
path
stringquerystring
string
Returns
- string
OnAfterRenderAsync(bool)
Method invoked after each time the component has been rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any Microsoft.AspNetCore.Components.ElementReference fields will be populated by the time this runs.
This method is not invoked during prerendering or server-side rendering, because those processes are not attached to any live browser DOM and are already complete before the DOM is updated.
Note that the component does not automatically re-render after the completion of any returned System.Threading.Tasks.Task, because that would cause an infinite render loop.
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
firstRender
boolSet to
true
if this is the first time Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) has been invoked on this component instance; otherwisefalse
.
Returns
- Task
A System.Threading.Tasks.Task representing any asynchronous operation.
Remarks
The Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) and Microsoft.AspNetCore.Components.ComponentBase.OnAfterRenderAsync(bool) lifecycle methods
are useful for performing interop, or interacting with values received from @ref
.
Use the firstRender
parameter to ensure that initialization work is only performed
once.
ScrollToPageTop()
public Task ScrollToPageTop()
Returns
- Task
SetModuleTitle(string)
public void SetModuleTitle(string title)
Parameters
title
string
SetModuleVisibility(bool)
public void SetModuleVisibility(bool visible)
Parameters
visible
bool
SetPageTitle(string)
public void SetPageTitle(string title)
Parameters
title
string
ShouldRender()
Returns a flag to indicate whether the component should render.
protected override bool ShouldRender()
Returns
- bool
ShowProgressIndicator()
public void ShowProgressIndicator()