Exemplo n.º 1
0
 private void _browserStateNotificationService_SelectionRuleCreated(object sender, SelectionRuleCreatedEventArgs e)
 {
     if (e.SelectionRule.ProfileId == Id)
     {
         SelectionRules.Add(new SelectionRuleViewModel(_mediator, e.SelectionRule));
     }
 }
Exemplo n.º 2
0
        /// <summary>
        ///     Adds the given <see cref="IMemberSelectionRule" /> to the factory.
        /// </summary>
        /// <exception cref="ArgumentNullException">memberSelectionRule can not be null.</exception>
        /// <param name="memberSelectionRule">The <see cref="IMemberSelectionRule" /> to add.</param>
        /// <returns>Returns the modified factory.</returns>
        public IInstanceFactory AddSelectionRule(IMemberSelectionRule memberSelectionRule)
        {
            memberSelectionRule.ThrowIfNull(nameof(memberSelectionRule));

            SelectionRules.Add(memberSelectionRule);
            return(this);
        }