Exemplo n.º 1
0
        public IndexConfigForView GetIndexView(Guid pk)
        {
            if (IsDisposing)
            {
                return(new IndexConfigForView());
            }

            IndexConfigForView indexConfigForView;

            if (MaintainerPool.TryGetValue(pk, out var wrapper))
            {
                indexConfigForView = IndexConfigForView.GetIndexConfigForView(wrapper.IndexConfig);
            }
            else
            {
                indexConfigForView = new IndexConfigForView();
            }

            return(indexConfigForView);
        }
Exemplo n.º 2
0
        public FetchResult <IndexConfigForView[]> GetIndexViewList()
        {
            if (IsDisposing)
            {
                return(ManagementIsDisposing <IndexConfigForView[]>());
            }

            return(new FetchResult <IndexConfigForView[]>
            {
                Result = MaintainerPool.Where(u => validStatusForSearching.Contains(u.Value.Status)).Select(u => IndexConfigForView.GetIndexConfigForView(u.Value.IndexConfig)).ToArray(),
                Status = new Status
                {
                    Success = true
                }
            });
        }