/
maxja
/
OneSTools.TechLog-Vault
Обзор
Документация
Войти
/
maxja
/
OneSTools.TechLog-Vault
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
OneSTools.TechLog/DeadlockConnectionIntersectionsInfo.cs
26 строк
807 B
Акпаев Евгений Александрович
Фиксация промежуточной работы
28 янв 2021, 00:44
28 янв 2021, 00:44
6a49a7d
Код
Авторство
О чём код?
using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text.RegularExpressions; namespace OneSTools.TechLog { public class DeadlockConnectionIntersectionsInfo { public ReadOnlyCollection<DeadlockConnectionIntersectionsPair> Pairs { get; } public DeadlockConnectionIntersectionsInfo(string data) { var pairs = new List<DeadlockConnectionIntersectionsPair>(); var pairsMatch = Regex.Matches(data, @"\d+ \d+.*?(?=(,\d+ \d+|$))", RegexOptions.ExplicitCapture); foreach (Match pairMatch in pairsMatch) { var pair = new DeadlockConnectionIntersectionsPair(pairMatch.Value); pairs.Add(pair); } Pairs = pairs.AsReadOnly(); } } }