예제 #1
0
        private static void ConsistencyCheckLabelScanStore(LabelScanStore labelScanStore, ConsistencyReporter report, ProgressListener listener)
        {
            ConsistencyReporter.FormattingDocumentedHandler handler = report.FormattingHandler(RecordType.LABEL_SCAN_DOCUMENT);
            ReporterFactory proxyFactory = new ReporterFactory(handler);

            labelScanStore.ConsistencyCheck(proxyFactory);
            handler.UpdateSummary();
            listener.Add(1);
        }
예제 #2
0
        private static void ConsistencyCheckSchemaIndexes(IndexAccessors indexes, ConsistencyReporter report, ProgressListener listener)
        {
            IList <StoreIndexDescriptor> rulesToRemove = new List <StoreIndexDescriptor>();

            foreach (StoreIndexDescriptor onlineRule in indexes.OnlineRules())
            {
                ConsistencyReporter.FormattingDocumentedHandler handler = report.FormattingHandler(RecordType.INDEX);
                ReporterFactory reporterFactory = new ReporterFactory(handler);
                IndexAccessor   accessor        = indexes.AccessorFor(onlineRule);
                if (!accessor.ConsistencyCheck(reporterFactory))
                {
                    rulesToRemove.Add(onlineRule);
                }
                handler.UpdateSummary();
                listener.Add(1);
            }
            foreach (StoreIndexDescriptor toRemove in rulesToRemove)
            {
                indexes.Remove(toRemove);
            }
        }