Table of Contents

Class ModuleBase

Namespace
Oqtane.Modules
Assembly
Oqtane.Client.dll
public abstract class ModuleBase : ComponentBase, IModuleControl
Inheritance
object
ComponentBase
ModuleBase
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

ILogService

ModuleInstance

public ModuleInstance ModuleInstance { get; }

Property Value

ModuleInstance

ModuleState

[CascadingParameter]
protected Module ModuleState { get; set; }

Property Value

Module

PageState

[CascadingParameter]
protected PageState PageState { get; set; }

Property Value

PageState

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

RenderModeBoundary

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

SecurityAccessLevel

SiteState

[Inject]
protected SiteState SiteState { get; set; }

Property Value

SiteState

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

ModuleBase.Logger

Methods

AddHeadContent(string)

public void AddHeadContent(string content)

Parameters

content string

AddModuleMessage(string, MessageType)

public void AddModuleMessage(string message, MessageType type)

Parameters

message string
type MessageType

AddModuleMessage(string, MessageType, string)

public void AddModuleMessage(string message, MessageType type, string position)

Parameters

message string
type MessageType
position 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 int
asAttachment bool

Returns

string

EditUrl(int, string)

public string EditUrl(int moduleId, string action)

Parameters

moduleId int
action string

Returns

string

EditUrl(int, string, Dictionary<string, string>)

public string EditUrl(int moduleId, string action, Dictionary<string, string> querystring)

Parameters

moduleId int
action string
querystring Dictionary<string, string>

Returns

string

EditUrl(int, string, string)

public string EditUrl(int moduleId, string action, string querystring)

Parameters

moduleId int
action string
querystring 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 string
querystring 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 string
moduleid int
action string
querystring Dictionary<string, string>

Returns

string

EditUrl(string, int, string, string)

public string EditUrl(string path, int moduleid, string action, string querystring)

Parameters

path string
moduleid int
action string
querystring string

Returns

string

EditUrl(string, string)

public string EditUrl(string action, string querystring)

Parameters

action string
querystring 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 int
download bool

Returns

string

FileUrl(string, string)

public string FileUrl(string folderpath, string filename)

Parameters

folderpath string
filename string

Returns

string

FileUrl(string, string, bool)

public string FileUrl(string folderpath, string filename, bool download)

Parameters

folderpath string
filename string
download 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 int
width int
height int

Returns

string

ImageUrl(int, int, int, string)

public string ImageUrl(int fileid, int width, int height, string mode)

Parameters

fileid int
width int
height int
mode 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 int
width int
height int
mode string
position string
background string
rotate int
recreate 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 Alias
level LogLevel
function LogFunction
exception Exception
message string
args 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

alias Alias
level LogLevel
function string
exception Exception
message string
args object[]

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 int
action string

Returns

string

NavigateUrl(int, string, Dictionary<string, string>)

public string NavigateUrl(int moduleId, string action, Dictionary<string, string> querystring)

Parameters

moduleId int
action string
querystring Dictionary<string, string>

Returns

string

NavigateUrl(int, string, string)

public string NavigateUrl(int moduleId, string action, string querystring)

Parameters

moduleId int
action string
querystring 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 string
refresh bool

Returns

string

NavigateUrl(string, Dictionary<string, string>)

public string NavigateUrl(string path, Dictionary<string, string> querystring)

Parameters

path string
querystring Dictionary<string, string>

Returns

string

NavigateUrl(string, int, string)

public string NavigateUrl(string path, int moduleId, string action)

Parameters

path string
moduleId int
action 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 string
moduleId int
action string
querystring Dictionary<string, string>

Returns

string

NavigateUrl(string, int, string, string)

public string NavigateUrl(string path, int moduleId, string action, string querystring)

Parameters

path string
moduleId int
action string
querystring string

Returns

string

NavigateUrl(string, string)

public string NavigateUrl(string path, string querystring)

Parameters

path string
querystring 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 bool

Set to true if this is the first time Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) has been invoked on this component instance; otherwise false.

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()