Class ApplicationMaintenanceCommand
Represents application maintenance command.
Inherited Members
Namespace: DotNext.Maintenance.CommandLine
Assembly: DotNext.MaintenanceServices.dll
Syntax
public sealed class ApplicationMaintenanceCommand : Command, ICompletionSource, IEnumerable<Symbol>, IEnumerable
Remarks
All registered singleton services of this type in DI container will be automatically discovered by CommandLineMaintenanceInterfaceHost.
Constructors
| Edit this page View SourceApplicationMaintenanceCommand(string, string?)
Initializes a new maintenance command.
Declaration
public ApplicationMaintenanceCommand(string name, string? description = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the command. |
string | description | The description of the command. |
Methods
| Edit this page View SourceCreate(IApplicationStatusProvider)
Creates a command that can be used to execute members of IApplicationStatusProvider.
Declaration
public static ApplicationMaintenanceCommand Create(IApplicationStatusProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IApplicationStatusProvider | provider | The status provider. |
Returns
Type | Description |
---|---|
ApplicationMaintenanceCommand | A new command. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
EnterInteractiveModeCommand()
Creates a command that allows to enter interactive mode.
Declaration
public static ApplicationMaintenanceCommand EnterInteractiveModeCommand()
Returns
Type | Description |
---|---|
ApplicationMaintenanceCommand | A new command. |
GCCommand()
Creates a command that allows to force Garbage Collection.
Declaration
public static ApplicationMaintenanceCommand GCCommand()
Returns
Type | Description |
---|---|
ApplicationMaintenanceCommand | A new command. |
GetDefaultCommands()
Gets a collection of default commands.
Declaration
public static IEnumerable<ApplicationMaintenanceCommand> GetDefaultCommands()
Returns
Type | Description |
---|---|
IEnumerable<ApplicationMaintenanceCommand> | A collection of default commands. |
See Also
| Edit this page View SourceLeaveInteractiveModeCommand()
Creates a command that allows to leave interactive mode.
Declaration
public static ApplicationMaintenanceCommand LeaveInteractiveModeCommand()
Returns
Type | Description |
---|---|
ApplicationMaintenanceCommand | A new command. |
Events
| Edit this page View SourceAuthorization
Allows to attach custom authorization rules for this command.
Declaration
public event AuthorizationCallback Authorization
Event Type
Type | Description |
---|---|
AuthorizationCallback |