public IEnumerable <TResult> Where <TResult>(ISagaFilter <TSaga> filter, Func <TSaga, TResult> transformer)
 {
     return(_inner.Where(filter, x =>
     {
         _context.InjectProperties(x);
         return transformer(x);
     }));
 }
 public IEnumerable <TSaga> Where(ISagaFilter <TSaga> filter)
 {
     return(_repository.Where(filter).Select(x =>
     {
         _callback(x);
         return x;
     }));
 }
 public IEnumerable <TSaga> Where(ISagaFilter <TSaga> filter)
 {
     return(_inner.Where(filter).Select(x =>
     {
         _context.InjectProperties <TSaga>(x);
         return x;
     }));
 }
 public IEnumerable <TResult> Where <TResult>(ISagaFilter <TSaga> filter, Func <TSaga, TResult> transformer)
 {
     return(_repository.Where(filter, x =>
     {
         _callback(x);
         return transformer(x);
     }));
 }
Esempio n. 5
0
        public IEnumerable <TSaga> Where(ISagaFilter <TSaga> filter)
        {
            using (var scope = new TransactionScope(TransactionScopeOption.RequiresNew))
                using (ISession session = _sessionFactory.OpenSession())
                {
                    List <TSaga> result = session.Query <TSaga>()
                                          .Where(filter.FilterExpression)
                                          .ToList();

                    scope.Complete();

                    return(result);
                }
        }
        public IEnumerable <TSaga> Where(ISagaFilter <TSaga> filter)
        {
            //using (var scope = new TransactionScope(TransactionScopeOption.RequiresNew))
            using (var session = dbProvider.Open())
            {
                List <TSaga> result = session.GetList <TSaga>().AsQueryable()
                                      .Where(filter.FilterExpression)
                                      .ToList();

                //scope.Complete();

                return(result);
            }
        }
Esempio n. 7
0
        public IEnumerable <TSaga> Where(ISagaFilter <TSaga> filter)
        {
            lock (_lock)
            {
                IndexedSagaProperty <TSaga> index = HasIndexFor(filter.FilterExpression);
                if (index == null)
                {
                    return(_indexById.Where(filter.Filter).ToList());
                }

                object rightValue = GetRightValue(filter.FilterExpression);

                return(index.Where(rightValue, filter.Filter).ToList());
            }
        }
Esempio n. 8
0
        public IEnumerable <TSaga> Where(ISagaFilter <TSaga> filter)
        {
            using (var session = this.documentStore.OpenSession())
            {
                RavenQueryStatistics statistics;

                session.Query <TSaga>()
                .Where(filter.FilterExpression).Statistics(out statistics).Take(0).ToList();

                var enumerator = session.Advanced.Stream(
                    session.Query <TSaga>(statistics.IndexName)
                    .Where(filter.FilterExpression)
                    .Customize(c => c.WaitForNonStaleResultsAsOfLastWrite()));
                while (enumerator.MoveNext())
                {
                    yield return(enumerator.Current.Document);
                }
            }
        }
Esempio n. 9
0
        public IEnumerable <TInstance> Where(ISagaFilter <TInstance> filter)
        {
            var whereResult = new List <TInstance>();

            this.RetrieveAndProcessResult(
                () =>
            {
                var query = this.bucket.CreateQuery(
                    this.settings.DesignDocumentName,
                    this.settings.BucketViewName);

                return(this.bucket.Query <TInstance>(query));
            },
                result => whereResult.AddRange(
                    result.Rows.Select(item => item.Value)
                    .AsQueryable()
                    .Where(filter.FilterExpression)));

            return(whereResult);
        }
 public IEnumerable <Guid> Find(ISagaFilter <T> filter)
 {
     return(_repository.Find(filter));
 }
Esempio n. 11
0
 public IEnumerable <TResult> Where <TResult>(ISagaFilter <TSaga> filter, Func <TSaga, TResult> transformer)
 {
     return(Where(filter).Select(transformer));
 }
Esempio n. 12
0
 public IEnumerable <TResult> Where <TResult>(ISagaFilter <TInstance> filter, Func <TInstance, TResult> transformer)
 {
     return(this.Where(filter).Select(transformer));
 }
Esempio n. 13
0
 public IEnumerable <Guid> Find(ISagaFilter <TSaga> filter)
 {
     return(Where(filter, x => x.CorrelationId));
 }
Esempio n. 14
0
 public IEnumerable <TSaga> Where(ISagaFilter <TSaga> filter)
 {
     return(_sagas.Where(filter));
 }
Esempio n. 15
0
 public IEnumerable <Guid> Find(ISagaFilter <TSaga> filter)
 {
     return(_sagas.Where(filter).Select(x => x.CorrelationId));
 }
 public IEnumerable <Guid> Find(ISagaFilter <TSaga> filter)
 {
     return(_inner.Find(filter));
 }
 /// <summary> Enumerates where in this collection. </summary>
 /// <param name="filter"> A filter specifying the. </param>
 /// <returns> An enumerator that allows foreach to be used to process where in this collection. </returns>
 public IEnumerable <TSaga> Where(ISagaFilter <TSaga> filter)
 {
     return(Queryable.Where(filter.FilterExpression).ToList());
 }
 public IEnumerable <T> Where(ISagaFilter <T> filter)
 {
     return(_repository.Where(filter));
 }
 /// <summary> Enumerates where in this collection. </summary>
 /// <typeparam name="TResult"> Type of the result. </typeparam>
 /// <param name="filter"> A filter specifying the. </param>
 /// <param name="transformer"> The transformer. </param>
 /// <returns> An enumerator that allows foreach to be used to process where&lt; t result&gt; in this collection. </returns>
 public IEnumerable <TResult> Where <TResult>(
     ISagaFilter <TSaga> filter,
     Func <TSaga, TResult> transformer)
 {
     return(Queryable.Where(filter.FilterExpression).Select(transformer).ToList());
 }
 public IEnumerable <TResult> Where <TResult>(ISagaFilter <T> filter, Func <T, TResult> transformer)
 {
     return(_repository.Where(filter, transformer));
 }
Esempio n. 21
0
 public IEnumerable <Guid> Find(ISagaFilter <TInstance> filter)
 {
     return(this.Where(filter, x => x.CorrelationId));
 }