//============================= private List <EphoneTuple> SetEphonePairs() { EphoneTuple ephonePairs; List <EphoneTuple> ephonePairList = new List <EphoneTuple>(); foreach (var ephoneEntry in _ephone) { var ephoneEntryValue = ephoneEntry.Value; if (ephoneEntryValue.Keys.Contains("button")) { foreach (var ephoneDnEntry in _ephoneDn) { Match ephoneDnNumberMatch = Regex.Match(ephoneDnEntry.Key, @"\bephone-dn\s+(\d+).*\b"); string ephoneDNnumber = ephoneDnNumberMatch.Groups[1].ToString(); string[] buttonNumberNormal = ephoneEntryValue["button"].Split(':', ' '); if (buttonNumberNormal[1] == ephoneDNnumber) { ephonePairs = new EphoneTuple(ephoneEntry, ephoneDnEntry); ephonePairList.Add(ephonePairs); // prawdopodobnie skonczone. Dodawanie par do listy. } } } } return(ephonePairList); }
//============================= private List<EphoneTuple> SetEphonePairs() { EphoneTuple ephonePairs; List<EphoneTuple> ephonePairList = new List<EphoneTuple>(); foreach(var ephoneEntry in _ephone) { var ephoneEntryValue = ephoneEntry.Value; if (ephoneEntryValue.Keys.Contains("button")) { foreach (var ephoneDnEntry in _ephoneDn) { Match ephoneDnNumberMatch = Regex.Match(ephoneDnEntry.Key, @"\bephone-dn\s+(\d+).*\b"); string ephoneDNnumber = ephoneDnNumberMatch.Groups[1].ToString(); string[] buttonNumberNormal = ephoneEntryValue["button"].Split(':', ' '); if (buttonNumberNormal[1] == ephoneDNnumber) { ephonePairs = new EphoneTuple(ephoneEntry, ephoneDnEntry); ephonePairList.Add(ephonePairs); // prawdopodobnie skonczone. Dodawanie par do listy. } } } } return ephonePairList; }