Exemplo n.º 1
0
        public IList <ProjectionSource> SelectProjections(DocumentStore store)
        {
            var projections = store
                              .Options
                              .Projections
                              .All;

            if (ProjectionFlag.IsNotEmpty())
            {
                var list       = new List <ProjectionSource>();
                var projection = projections.FirstOrDefault(x => x.ProjectionName.EqualsIgnoreCase(ProjectionFlag));
                if (projection != null)
                {
                    list.Add(projection);
                }

                return(list);
            }

            return(projections);
        }
Exemplo n.º 2
0
        internal IList <IProjectionSource> SelectProjectionsForRebuild(DocumentStore store)
        {
            var projections = store
                              .Options
                              .Projections
                              .All
                              .Where(p => p.Lifecycle != ProjectionLifecycle.Live)
                              .ToList();

            if (ProjectionFlag.IsNotEmpty())
            {
                var list       = new List <IProjectionSource>();
                var projection = projections.FirstOrDefault(x => x.ProjectionName.EqualsIgnoreCase(ProjectionFlag));
                if (projection != null)
                {
                    list.Add(projection);
                }

                return(list);
            }

            return(projections);
        }