private DslModel CreateRuleModelFor(string condition)
        {
            DslModel model = null;

            lock (dslFactory)
            {
                var wrapperRule = String.Format(@"
evaluate:
    {0}
", condition);
                var url         = dslEngineStorage.AddCondition(wrapperRule);
                model = dslFactory.TryCreate <RuleDslModel>(url);
                model.Initialize();
            }
            return(model);
        }
        public bool Evaluate <T>(string condition, T context)
        {
            EvaluationContext.CurrentContext = context;
            DslModel model = null;

            if (!parsedModels.ContainsKey(condition))
            {
                model = CreateRuleModelFor(condition);
                parsedModels.Add(condition, model);
            }
            else
            {
                model = parsedModels[condition];
            }
            return(model.Evaluate());
        }