Ejemplo n.º 1
0
        public void UpdateRule(EntityId entryRuleId, EntryRuleUpdateCommand command)
        {
            Assert.IsTrue(_entryRulesStore.State.Contains(entryRuleId));

            var entryRule = _entryRulesStore.State.Get(entryRuleId);

            UpdateRuleInternal(entryRule, command);

            _entryRulesStore.MarkAsDirty();
        }
Ejemplo n.º 2
0
        private void UpdateRuleInternal(EntryRule entryRule, EntryRuleUpdateCommand command)
        {
            if (command.AddressablePathRule != null)
            {
                entryRule.SetAddressablePathRule(command.AddressablePathRule);
            }

            if (command.AddressingMode.HasValue)
            {
                entryRule.SetAddressingMode(command.AddressingMode.Value);
            }

            if (command.GroupNameRule != null)
            {
                entryRule.SetGroupNameRule(command.GroupNameRule);
            }

            if (command.LabelRules != null)
            {
                entryRule.SetLabelRules(command.LabelRules);
            }
        }