Esempio n. 1
0
        public static IEnumerable <KeyValuePair <string, T> > Indexed <T>(Func <string, T> factory, string collection, IEqualityComparer <string> comparer, IConfBlock conf)
        {
            if (null == factory)
            {
                throw new ArgumentNullException(nameof(factory));
            }

            var coll = collection ?? typeof(T).Name;
            var dict = Pairs(coll, comparer, conf);
            var keys = dict.AllKeys;

            foreach (var key in keys)
            {
                var val = dict[key];
                var cnf = new ConfContainer {
                    Content = val
                };
                var obj = factory(key);
                yield return(new KeyValuePair <string, T>(key, cnf.Configure(obj, "")));
            }
        }
Esempio n. 2
0
 public ReleaseCommand(object content)
 {
     Conf = new ConfContainer {
         Content = content
     };
 }