Class ConsoleCommandBase
Inheritance
System.Object
ConsoleCommandBase
Assembly: Dnn.PersonaBar.Library.dll
Syntax
public abstract class ConsoleCommandBase : object, IConsoleCommand
Properties
|
Improve this Doc
View Source
Args
Declaration
protected string[] Args { get; }
Property Value
| Type |
Description |
| System.String[] |
|
|
Improve this Doc
View Source
Flags
Declaration
protected Hashtable Flags { get; }
Property Value
| Type |
Description |
| Hashtable |
|
|
Improve this Doc
View Source
LocalResourceFile
Declaration
public abstract string LocalResourceFile { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
PortalId
Declaration
protected int PortalId { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PortalSettings
Declaration
protected PortalSettings PortalSettings { get; }
Property Value
|
Improve this Doc
View Source
ResultHtml
Gets resource key for the result html.
Declaration
public virtual string ResultHtml { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
TabId
Declaration
protected int TabId { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
User
Declaration
protected UserInfo User { get; }
Property Value
|
Improve this Doc
View Source
ValidationMessage
Declaration
public string ValidationMessage { get; }
Property Value
| Type |
Description |
| System.String |
|
Methods
|
Improve this Doc
View Source
AddMessage(String)
Declaration
protected void AddMessage(string message)
Parameters
| Type |
Name |
Description |
| System.String |
message |
|
|
Improve this Doc
View Source
GetFlagValue<T>(String, String, T, Boolean, Boolean, Boolean)
Declaration
public virtual T GetFlagValue<T>(string flag, string fieldName, T defaultVal, bool required = false, bool checkmain = false, bool checkpositive = false)
Parameters
| Type |
Name |
Description |
| System.String |
flag |
Flag name to look.
|
| System.String |
fieldName |
Filed name to show in message.
|
| T |
defaultVal |
Default value of the flag, if any.
|
| System.Boolean |
required |
Is this a required flag or not.
|
| System.Boolean |
checkmain |
Try to find the flag value in first args or not.
|
| System.Boolean |
checkpositive |
This would be applicable only if the output is of type int or double and value should be positive.
|
Returns
| Type |
Description |
| T |
The flag value or defaultVal.
|
Type Parameters
| Name |
Description |
| T |
Type of the output expected.
|
|
Improve this Doc
View Source
HasFlag(String)
Declaration
protected bool HasFlag(string flagName)
Parameters
| Type |
Name |
Description |
| System.String |
flagName |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Init(String[], PortalSettings, UserInfo, Int32)
Declaration
public virtual void Init(string[] args, PortalSettings portalSettings, UserInfo userInfo, int activeTabId)
Parameters
| Type |
Name |
Description |
| System.String[] |
args |
|
| PortalSettings |
portalSettings |
|
| UserInfo |
userInfo |
|
| System.Int32 |
activeTabId |
|
|
Improve this Doc
View Source
Initialize(String[], PortalSettings, UserInfo, Int32)
Declaration
public void Initialize(string[] args, PortalSettings portalSettings, UserInfo userInfo, int activeTabId)
Parameters
| Type |
Name |
Description |
| System.String[] |
args |
|
| PortalSettings |
portalSettings |
|
| UserInfo |
userInfo |
|
| System.Int32 |
activeTabId |
|
|
Improve this Doc
View Source
IsFlag(Object)
Declaration
protected bool IsFlag(object input)
Parameters
| Type |
Name |
Description |
| System.Object |
input |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsValid()
Declaration
public virtual bool IsValid()
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
LocalizeString(String)
Declaration
protected string LocalizeString(string key)
Parameters
| Type |
Name |
Description |
| System.String |
key |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Run()
Declaration
public abstract ConsoleResultModel Run()
Returns
Implements
Extension Methods