public class RegistryTableItem
{
public int Root { get; set; }//assume possible values are 0,1,2,3
public string Name { get; set; }
public string Component_ { get; set; }
}
List<RegistryTableItem> _all_RegistryTable_items = //assume you have data in this;
var result= from regitems in MsiReader._all_RegistryTable_items
group regitems by regitems.Component_;
having (root==1 || root==3) && (root==0 || root==2);//fix this line
The rule is rootcolumn values in each Componentgroup should be 0,2 or 1,3 (Only these combinations are valid groups). I want items which do not pass this rule.
eg: if a component_x has RegistryTableItems with distinct root values as 1,0 or 2,3 or 1,2,3 etc it should come in the result since they are not part of the valid 2 groups.