Class CustomComponent
Subclass to implement components that can be called by Custom Component
pages.
Inheritance
Implements
Namespace: Softadmin.Api
Assembly: Softadmin.Api.dll
Syntax
public abstract class CustomComponent : MarshalByRefObject, IDisposable
Remarks
A custom component is always a hidden component.
Properties
Cookies
Gets or sets the current cookies.
Declaration
public ICookies Cookies { get; set; }
Property Value
Type | Description |
---|---|
ICookies |
CredentialsStore
The Credentials Store grants the component access to the system's encrypted credentials.
Declaration
public ICredentialsStore CredentialsStore { get; set; }
Property Value
Type | Description |
---|---|
ICredentialsStore |
DbRequestFactory
Gets or sets the component's database request factory.
Declaration
public IDbRequestFactory DbRequestFactory { get; set; }
Property Value
Type | Description |
---|---|
IDbRequestFactory |
DebugWindow
Gets or sets the component's debug window.
Declaration
public IDebugWindow DebugWindow { get; set; }
Property Value
Type | Description |
---|---|
IDebugWindow |
Remarks
This property will be null
unless the page's "Print debug output" property is enabled.
DocumentationUrl
Gets an URL to the component's developer documentation.
Declaration
public virtual string DocumentationUrl { get; }
Property Value
Type | Description |
---|---|
System.String |
Environment
Gets or sets the current environment.
Declaration
public IEnvironment Environment { get; set; }
Property Value
Type | Description |
---|---|
IEnvironment |
EventArguments
Gets or sets the event arguments.
Declaration
public string[] EventArguments { get; set; }
Property Value
Type | Description |
---|---|
System.String[] |
Remarks
This property is only non-null when the component is executed as an event listener menu item.
Parameters
Gets or sets the menu item's parameters.
Declaration
public IParameters Parameters { get; set; }
Property Value
Type | Description |
---|---|
IParameters |
ProgressWindow
Gets or sets the component's progress window.
Declaration
public IProgressWindow ProgressWindow { get; set; }
Property Value
Type | Description |
---|---|
IProgressWindow |
SessionVariables
Gets or sets the current session variables.
Declaration
public ISessionVariables SessionVariables { get; set; }
Property Value
Type | Description |
---|---|
ISessionVariables |
SystemSettings
Gets or sets the current system settings.
Declaration
public ISystemSettings SystemSettings { get; set; }
Property Value
Type | Description |
---|---|
ISystemSettings |
Methods
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Disposes of the component.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Execute()
Executes the component. This is the method you override to build your component.
Declaration
public abstract void Execute()
Exceptions
Type | Condition |
---|---|
AdminMessageException | This exception type is shown as an error message to the user. |
System.Exception | Any other exception thrown during execution of the custom component will be caught and logged and a generic error message will inform the user that an error has occurred. |
GetForwardRequest()
Override this method to create the request that the component makes to forward after it has finished executing.
Declaration
public virtual IDbRequest GetForwardRequest()
Returns
Type | Description |
---|---|
IDbRequest | A request to get forwarding info, or |
Exceptions
Type | Condition |
---|---|
System.Exception | Any exception thrown during execution of the custom component will be caught and logged and a generic error message will tell the user that an error has occurred. |