Class FailureMessageCriteriaAdapter<TValidated, TParent>
Adapter class which allows a IHasFailureMessageUsageCriteria<TValidated> to be used as a IHasFailureMessageUsageCriteria.
Inheritance
System.Object
FailureMessageCriteriaAdapter<TValidated, TParent>
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CSF.Validation.Messages
Assembly: CSF.Validation.dll
Syntax
public class FailureMessageCriteriaAdapter<TValidated, TParent> : IHasFailureMessageUsageCriteria
Type Parameters
Name | Description |
---|---|
TValidated | The validated type. |
TParent | The parent validated type. |
Constructors
| Improve this Doc View SourceFailureMessageCriteriaAdapter(IHasFailureMessageUsageCriteria<TValidated, TParent>)
Initialises a new instance of FailureMessageCriteriaAdapter<TValidated, TParent>.
Declaration
public FailureMessageCriteriaAdapter(IHasFailureMessageUsageCriteria<TValidated, TParent> wrapped)
Parameters
Type | Name | Description |
---|---|---|
IHasFailureMessageUsageCriteria<TValidated, TParent> | wrapped | The wrapped service. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
Methods
| Improve this Doc View SourceCanGetFailureMessage(ValidationRuleResult)
Gets a value which indicates whether or not the current class may be used to provide a failure message for the specified validation rule result.
Declaration
public bool CanGetFailureMessage(ValidationRuleResult result)
Parameters
Type | Name | Description |
---|---|---|
ValidationRuleResult | result | A validation rule result. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current instance may provide a message for the result; false otherwise. |