예제 #1
0
        private IDictionary <string, object> Run(IDictionary <string, object> source)
        {
            if (_creator == null)
            {
                _creator = DictionaryCreatorFactory.CreateFunc(source);
            }
            var target = _creator(_references.Count);

            for (int i = 0; i < _references.Count; i++)
            {
                _resolvers[i].CopyValue(source, target);
            }
            return(target);
        }
예제 #2
0
        public IDictionary <string, object> Run(IGrouping <IDictionary <string, object>, IDictionary <string, object> > grouping)
        {
            if (_creator == null)
            {
                _creator = DictionaryCreatorFactory.CreateFunc(grouping.Key);
            }
            var target = _creator(_references.Count);

            for (int i = 0; i < _references.Count; i++)
            {
                _resolvers[i].CopyValue(grouping.Key, target, grouping);
            }
            return(target);
        }