Class CommandRequirementsResult
Represents results of Requirements checks.
Inheritance
Namespace: TehGM.Wolfringo.Commands.Results
Assembly: Wolfringo.Commands.dll
Syntax
public class CommandRequirementsResult : IMessagesCommandResult, ICommandResult
Constructors
| Improve this Doc View SourceCommandRequirementsResult(CommandResultStatus, IEnumerable<String>)
Creates a new result instance.
Declaration
public CommandRequirementsResult(CommandResultStatus status, IEnumerable<string> messages)
Parameters
Type | Name | Description |
---|---|---|
CommandResultStatus | status | Status telling Command Service how to proceed. |
System.Collections.Generic.IEnumerable<System.String> | messages | Set of messages to reply with. |
Properties
| Improve this Doc View SourceIsSuccess
Whether execution or check was successful.
Declaration
[Obsolete("Use Status property instead.")]
public bool IsSuccess { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
This property has been obsoleted in favour of Status and will be removed in future updates.
Messages
Set of messages to reply with.
Declaration
public IEnumerable<string> Messages { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Status
Status telling commands service how to progress with the execution.
Declaration
public CommandResultStatus Status { get; }
Property Value
Type | Description |
---|---|
CommandResultStatus |
Methods
| Improve this Doc View SourceFailure(IEnumerable<String>)
Creates a failure result.
Declaration
public static CommandRequirementsResult Failure(IEnumerable<string> messages)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | messages | Optional set of messages to reply with. |
Returns
Type | Description |
---|---|
CommandRequirementsResult | A new result instance. |
Failure(String[])
Creates a failure result.
Declaration
public static CommandRequirementsResult Failure(params string[] messages)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | messages | Optional set of messages to reply with. |
Returns
Type | Description |
---|---|
CommandRequirementsResult | A new result instance. |
Skip(IEnumerable<String>)
Creates a skip result.
Declaration
public static CommandRequirementsResult Skip(IEnumerable<string> messages)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | messages | Optional set of messages to reply with. |
Returns
Type | Description |
---|---|
CommandRequirementsResult | A new result instance. |
Skip(String[])
Creates a skip result.
Declaration
public static CommandRequirementsResult Skip(params string[] messages)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | messages | Optional set of messages to reply with. |
Returns
Type | Description |
---|---|
CommandRequirementsResult | A new result instance. |
Success(IEnumerable<String>)
Creates a success result.
Declaration
public static CommandRequirementsResult Success(IEnumerable<string> messages)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | messages | Optional set of messages to reply with. |
Returns
Type | Description |
---|---|
CommandRequirementsResult | A new result instance. |
Success(String[])
Creates a success result.
Declaration
public static CommandRequirementsResult Success(params string[] messages)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | messages | Optional set of messages to reply with. |
Returns
Type | Description |
---|---|
CommandRequirementsResult | A new result instance. |