Interface ICommand
- Namespace
- AngleSharp.Browser
- Assembly
- AngleSharp.dll
Represents a command that can be executed from the document.
public interface ICommand
- Extension Methods
Properties
CommandId
The id of the command.
string CommandId { get; }
Property Value
Methods
Execute(IDocument, bool, string)
Executes the command for the given document.
bool Execute(IDocument document, bool showUserInterface, string value)
Parameters
document
IDocumentThe document to alter.
showUserInterface
boolShould the UI be shown?
value
stringThe argument value.
Returns
- bool
A boolean if the command could be run.
GetValue(IDocument)
Gets the value that would be changed at the moment.
string GetValue(IDocument document)
Parameters
document
IDocumentThe document to apply to.
Returns
- string
The value that would be used by the command.
IsEnabled(IDocument)
Checks if the command is currently enabled.
bool IsEnabled(IDocument document)
Parameters
document
IDocumentThe document to apply to.
Returns
- bool
A boolean if the command is enabled.
IsExecuted(IDocument)
Checks if the command has been run already.
bool IsExecuted(IDocument document)
Parameters
document
IDocumentThe document to apply to.
Returns
- bool
A boolean if the command has already been applied.
IsIndeterminate(IDocument)
Checks if the command is currently neither enabled nor disabled.
bool IsIndeterminate(IDocument document)
Parameters
document
IDocumentThe document to apply to.
Returns
- bool
A boolean if the command is indeterminate.
IsSupported(IDocument)
Checks if the command is currently supported at all.
bool IsSupported(IDocument document)
Parameters
document
IDocumentThe document to apply to.
Returns
- bool
A boolean if the command is supported.