private void ImportBloodService() { List <string> data = File.ReadLines(@"F:\ЯндексДиск\работяга\Четвёртый курс\Второй семак\WSR\WSR_Laboratory\ImportData\blood_service.txt").ToList(); data.ForEach((item) => { string[] itemData = item.Split('\t'); string AnalyzerName = itemData[6]; analyzer analyzer = Laboratory.GetContext().analyzer.Where(p => p.name == AnalyzerName).FirstOrDefault(); if (analyzer == null) { analyzer = new analyzer(); analyzer.name = AnalyzerName; Laboratory.GetContext().analyzer.Add(analyzer); Laboratory.GetContext().SaveChanges(); } blood_service blood_service = new blood_service(); decimal service_code = decimal.Parse(itemData[1]); blood_service.service = Laboratory.GetContext().service.Where(p => p.code == service_code).FirstOrDefault(); int IdBlood = int.Parse(itemData[0]); blood blood = Laboratory.GetContext().blood.Where(p => p.id_blood == IdBlood).FirstOrDefault(); if (blood == null) { return; } blood_service.blood = blood; blood_service.result = decimal.Parse(itemData[2]); blood_service.date_finished = DateTimeOffset.FromUnixTimeMilliseconds(long.Parse(itemData[3])).DateTime; blood_service.accepted = bool.Parse(itemData[4]); blood_service.id_status = itemData[5] == "Finished" ? 1 : 2; int UserId = int.Parse(itemData[7]); blood_service.employee = Laboratory.GetContext().employee.Where(p => p.id_user == UserId).FirstOrDefault(); Laboratory.GetContext().blood_service.Add(blood_service); analyzer_blood_service analyzer_Blood = new analyzer_blood_service(); analyzer_Blood.analyzer = analyzer; analyzer_Blood.blood_service = blood_service; analyzer_Blood.date_reception = blood.date_create; analyzer_Blood.date_finished = blood_service.date_finished; Laboratory.GetContext().analyzer_blood_service.Add(analyzer_Blood); }); Laboratory.GetContext().SaveChanges(); }
internal PartitionedFulltextIndexReader(IList <PartitionSearcher> partitionSearchers, string[] properties, Analyzer analyzer, TokenHolder propertyKeyTokenHolder) : this(partitionSearchers.Select(PartitionSearcherReference::new).Select(searcher->new SimpleFulltextIndexReader(searcher, properties, analyzer, propertyKeyTokenHolder)).ToList())
Assert.True(actual.Location == Location.None, $"Expected:\nA project diagnostic with No location\nActual:\n{FormatDiagnostics(analyzer: analyzer, actual)}");
expected.Path, actualSpan.Path, FormatDiagnostics(analyzer, diagnostic)));
return(GetSortedDiagnosticsFromDocuments(analyzer, GetDocuments(sources, language)));