private IPrivacyRule GetPrivacyRule(List <IPrivacyRule> rules) { IPrivacyRule privacyRule = null; foreach (var rule in rules) { if (rule is PrivacyValueAllowAll) { privacyRule = rule as PrivacyValueAllowAll; break; } if (rule is PrivacyValueAllowContacts) { privacyRule = rule as PrivacyValueAllowContacts; break; } } if (privacyRule == null) { privacyRule = new PrivacyValueDisallowAll(); } return(privacyRule); }
private IPrivacyRule GetPrivacyRule(List<IPrivacyRule> rules) { IPrivacyRule privacyRule = null; foreach (var rule in rules) { if (rule is PrivacyValueAllowAll) { privacyRule = rule as PrivacyValueAllowAll; break; } if (rule is PrivacyValueAllowContacts) { privacyRule = rule as PrivacyValueAllowContacts; break; } } if (privacyRule == null) { privacyRule = new PrivacyValueDisallowAll(); } return privacyRule; }