Exemple #1
0
        public void AddAudienceRestriction(string audience)
        {
            if (Conditions == null)
            {
                Conditions = new ConditionGroup();
            }

            var restriction = Conditions.Conditions.OfType <AudienceRestriction>().FirstOrDefault();

            if (restriction == null)
            {
                restriction = new AudienceRestriction();
                Conditions.Add(restriction);
            }

            restriction.Add(audience);
        }
Exemple #2
0
        public void AddAudienceRestriction(string audience)
        {
            if (Conditions == null)
            {
                Conditions = new ConditionGroup();
            }

            var restriction = Conditions.Conditions.OfType<AudienceRestriction>().FirstOrDefault();
            if (restriction == null)
            {
                restriction = new AudienceRestriction();
                Conditions.Add(restriction);
            }

            restriction.Add(audience);
        }