Class ActionDescriptor
A descriptor for actions which are essentially methods.
public class ActionDescriptor : Descriptor, IEquatable<Descriptor>, IComparable<Descriptor>
- Inheritance
-
ActionDescriptor
- Implements
- Inherited Members
Constructors
ActionDescriptor(string, string, Argument, IList<Argument>)
Creates a new action descriptor.
public ActionDescriptor(string name, string description, ActionDescriptor.Argument returns, IList<ActionDescriptor.Argument> arguments)
Parameters
namestringThe name of the action. Should be CamelCased.
descriptionstringA short description of the action, its parameters and what is supposed to do.
returnsActionDescriptor.ArgumentThe return value of the action. If nothing is returned, pass
nullhere.argumentsIList<ActionDescriptor.Argument>A list of key-value pairs describing the arguments for the action.
Properties
Arguments
Gets a list of key-value pairs describing the arguments of the action.
[TypeConverter(typeof(CollectionConverter))]
public IList<ActionDescriptor.Argument> Arguments { get; }
Property Value
ProvideErrorMessage
Provides a custom representation of an error.
public Func<Exception, object[], string> ProvideErrorMessage { get; protected set; }
Property Value
Returns
Gets the return value of this action. If this action does not return a value, the value is null.
public ActionDescriptor.Argument Returns { get; }
Property Value
Methods
CompareTo(Descriptor)
Compares the current descriptor with another descriptor.
public override int CompareTo(Descriptor other)
Parameters
otherDescriptorA descriptor to compare with this descriptor.
Returns
- int
A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings:
Value Meaning Less than zero This object is less than the otherparameter.Zero This object is equal to other.Greater than zero This object is greater than other.