public void UpdateRule(EntityId entryRuleId, EntryRuleUpdateCommand command) { Assert.IsTrue(_entryRulesStore.State.Contains(entryRuleId)); var entryRule = _entryRulesStore.State.Get(entryRuleId); UpdateRuleInternal(entryRule, command); _entryRulesStore.MarkAsDirty(); }
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); } }