我正在寻找两个数组之间的缺失事件:$tc_records
& $RelationshipEvents_array
。两个数组应该有相同的两个条目。
A->B 和反向 B->A 的条目。当我使用-and 语句评估RelationshipEvents 时,是否评估一个(相同)事件,或者-and 的每一侧加载数组并独立评估。
foreach ($record in $tc_records) {
# is this using the same RelationshipEvent for both comparisons or two different comparisons?
if($RelationshipEvents_array.entity1Id -eq $record.entity1Id -and $RelationshipEvents_array.entity2Id -eq $record.entity2Id){
$re_tc_matched_record.Add($record)
} else {
$re_tc_not_matched_record.Add($record)
}
}
in case this makes any difference:
Name Value
---- -----
PSVersion 6.2.3
PSEdition Core
GitCommitId 6.2.3
OS Darwin 19.0.0 Darwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0