Class AndSpecification<T>
AND specification.
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:Extend
Assembly:Extend.dll
Syntax
public class AndSpecification<T> : OperatorSpecification<T>, ISpecification<T>
Type Parameters
Name | Description |
---|---|
T | The target type of the specification. |
Constructors
| Improve this Doc View SourceAndSpecification(ISpecification<T>, ISpecification<T>)
Initialize a new instance of the AndSpecification<T> class.
Declaration
public AndSpecification(ISpecification<T> left, ISpecification<T> right)
Parameters
Type | Name | Description |
---|---|---|
ISpecification<T><T> | left | The left specification. |
ISpecification<T><T> | right | The right specification. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | left can not be null. |
System.ArgumentNullException | right can not be null. |
Methods
| Improve this Doc View SourceIsSatisfiedBy(T)
Checks if the given objects satisfies the specification.
Declaration
public override bool IsSatisfiedBy(T obj)
Parameters
Type | Name | Description |
---|---|---|
T | obj | The object to validate. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the object satisfies the specification; otherwise, false. |
Overrides
Extend.Specification<T>.IsSatisfiedBy(T)
|
Improve this Doc
View Source
IsSatisfiedByWithMessages(T)
Checks if the given objects satisfies the specification.
Declaration
public override IEnumerable<string> IsSatisfiedByWithMessages(T obj)
Parameters
Type | Name | Description |
---|---|---|
T | obj | The object to validate. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><System.String> | Returns a collection of error messages. |
Overrides
Extend.Specification<T>.IsSatisfiedByWithMessages(T)