public void RemoveExceptionCausingRules(List <Guid> list)
        {
            if (_ruleDefinitionsAfterTranslation.Count > 0)
            {
                foreach (Guid ruleID in list)
                {
                    DotNetNancy.Rules.RuleSet.RuleSetDefinition.RuleSetDefinition def =
                        _ruleDefinitionsAfterTranslation.Where(s => s.RuleID == ruleID).First();

                    if (def != null)
                    {
                        this._rulesRemovedFromRuleSetDueToException.Add(ruleID, def);

                        this._ruleDefinitionsAfterTranslation.Remove(def);
                    }
                    this._ruleToLastUpdatedOrCreatedDateTime.Remove(ruleID);

                    Rule rule = this.DotNetRuleSet.Rules.Where(s => s.Name == ruleID.ToString()).First();

                    if (rule != null)
                    {
                        this.DotNetRuleSet.Rules.Remove(rule);
                    }
                }
            }
        }
        public void RemoveRulesNotTranslatedToDotNetRuleSet(List <Guid> list)
        {
            foreach (Guid ruleID in list)
            {
                DotNetNancy.Rules.RuleSet.RuleSetDefinition.RuleSetDefinition def =
                    _ruleDefinitionsAfterTranslation.Where(s => s.RuleID == ruleID).First();

                _ruleDefinitionsAfterTranslation.Remove(def);                 //Remove rules not translated to dotNet rules
                _rulesRemovedDueTranslationValidationError.Add(ruleID, def);
            }
        }