Exemplo n.º 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);
        }
Exemplo n.º 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);
        }