• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Interface IConsoleCommand

Interface implemented by all commands.

Namespace: DotNetNuke.Abstractions.Prompt
Assembly: DotNetNuke.Abstractions.dll
Syntax
public interface IConsoleCommand

Properties

| Improve this Doc View Source

LocalResourceFile

Gets the local resx file to use to retrieve command description, help text and parameter descriptions.

Declaration
string LocalResourceFile { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ResultHtml

Gets the help text for the command. This is used when retrieving help for the command.

Declaration
string ResultHtml { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ValidationMessage

Gets the validation message for the user input. If the user input is invalid, specify what is wrong with it.

Declaration
string ValidationMessage { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

Initialize(String[], IPortalSettings, IUserInfo, Int32)

Initializes the command when invoked by the client. Note that you can opt to override this but you should call base.Initialize() to ensure all base values are loaded.

Declaration
void Initialize(string[] args, IPortalSettings portalSettings, IUserInfo userInfo, int activeTabId)
Parameters
Type Name Description
System.String[] args

Raw argument list passed by the client.

IPortalSettings portalSettings

PortalSettings for the portal we're operating under or if PortalId is specified, that portal.

IUserInfo userInfo

Current user.

System.Int32 activeTabId

Current page/tab.

| Improve this Doc View Source

IsValid()

Specify whether the user input for the command is valid.

Declaration
bool IsValid()
Returns
Type Description
System.Boolean

True is the command can execute.

| Improve this Doc View Source

Run()

The main method of the command which executes it.

Declaration
IConsoleResultModel Run()
Returns
Type Description
IConsoleResultModel

A class used by the client to display results.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS