(Dictionary<string, object?> capabilitiesDictionary, string capabilityName)
| 666 | } |
| 667 | |
| 668 | private static bool ContainsMatchCapability(Dictionary<string, object?> capabilitiesDictionary, string capabilityName) |
| 669 | { |
| 670 | if (capabilitiesDictionary.TryGetValue("alwaysMatch", out object? alwaysMatch) |
| 671 | && alwaysMatch is IDictionary<string, object> alwaysMatchCapabilities |
| 672 | && alwaysMatchCapabilities.ContainsKey(capabilityName)) |
| 673 | { |
| 674 | return true; |
| 675 | } |
| 676 | |
| 677 | if (capabilitiesDictionary.TryGetValue("firstMatch", out object? firstMatch) |
| 678 | && firstMatch is IEnumerable<object> firstMatchCandidates) |
| 679 | { |
| 680 | foreach (object candidate in firstMatchCandidates) |
| 681 | { |
| 682 | if (candidate is IDictionary<string, object> firstMatchCapabilities |
| 683 | && firstMatchCapabilities.ContainsKey(capabilityName)) |
| 684 | { |
| 685 | return true; |
| 686 | } |
| 687 | } |
| 688 | } |
| 689 | |
| 690 | return false; |
| 691 | } |
| 692 | |
| 693 | /// <summary> |
| 694 | /// Gets the capabilities as a dictionary. |
nothing calls this directly
no test coverage detected