/// <summary>Visits the specification and lets <paramref name="visitor"/> convert the contents of the specification into an expression that can /// be used to perform the actual filtering/selection.</summary> /// <param name="visitor">The instance that will perform the conversion.</param> /// <returns>The expression that was created using this specification.</returns> protected override Expression <Func <T, bool> > VisitCore(ISpecificationVisitor <T> visitor) { string message = "A business rule cannot be converted to a lambda-expression. " + "This exception is normally caused by a fault in the Repository-class."; throw new InvalidOperationException(message); }
public SparkHtmlReportGenerator(string path, bool showTimeInfo, IFileSystem fileSystem, ISparkRenderer renderer, Func<string, TextWriter> streamFactory, ISpecificationVisitor[] specificationVisitors) { _path = path; _showTimeInfo = showTimeInfo; _fileSystem = fileSystem; _renderer = renderer; _streamFactory = streamFactory; _specificationVisitors = specificationVisitors; }
public void Accept(ISpecificationVisitor visitor) { visitor.Visit(this); }
/// <summary>Visits the specification and lets <paramref name="visitor"/> convert the contents of the specification into an expression that can /// be used to perform the actual filtering/selection.</summary> /// <param name="visitor">The instance that will perform the conversion.</param> /// <returns>The expression that was created using this specification.</returns> protected override Expression <Func <T, bool> > VisitCore(ISpecificationVisitor <T> visitor) { return(visitor.CreateAndExpression(this.LeftOperand, this.RightOperand)); }
/// <summary> /// Método Accept do ISpecificationVisitor. /// </summary> /// <param name="visitor">visitor.</param> public abstract void Accept(ISpecificationVisitor visitor);
/// <summary>Visits the specification and lets <paramref name="visitor"/> convert the contents of the specification into an expression that can /// be used to perform the actual filtering/selection.</summary> /// <param name="visitor">The instance that will perform the conversion.</param> /// <returns>The expression that was created using this specification.</returns> protected override Expression <Func <T, bool> > VisitCore(ISpecificationVisitor <T> visitor) { return(visitor.CreateLambdaExpression(this.Expression)); }
/// <summary>Visits the specification and lets <paramref name="visitor"/> convert the contents of the specification into an expression that can /// be used to perform the actual filtering/selection.</summary> /// <param name="visitor">The instance that will perform the conversion.</param> /// <returns>The expression that was created using this specification.</returns> protected override Expression <Func <T, bool> > VisitCore(ISpecificationVisitor <T> visitor) { return(visitor.CreateLikeExpression(this.Field, this.Pattern)); }