Exemple #1
0
            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);
            }
Exemple #2
0
 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;
 }