/// <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;
 }
Esempio n. 3
0
 public void Accept(ISpecificationVisitor visitor)
 {
     visitor.Visit(this);
 }
Esempio n. 4
0
 /// <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));
 }
 public void Accept(ISpecificationVisitor visitor)
 {
   visitor.Visit(this);
 }
Esempio n. 6
0
 /// <summary>
 /// Método Accept do ISpecificationVisitor.
 /// </summary>
 /// <param name="visitor">visitor.</param>
 public abstract void Accept(ISpecificationVisitor visitor);
Esempio n. 7
0
 /// <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));
 }
Esempio n. 8
0
 /// <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));
 }