Esempio n. 1
0
        public IDictionary <string, object> RunFormats(IDictionary <string, object> opts = null, string field = null)
        {
            var rules  = (opts != null && opts.TryGetValue("rules", out var z) && z is ICollection <VRule> v1 ? v1 : null) ?? Rules;
            var state  = Binding.GetState(This, opts);
            var values = rules != null?V.Format(state, rules, field) : new Dictionary <string, object>();

            if (field != null && state.TryGetValue(field, out var s) && values.TryGetValue(field, out var v) && s == v)
            {
                return(new Dictionary <string, object>());
            }
            Binding.SetState(This, opts, values);
            return(values);
        }