Пример #1
0
        private EditableLookup <string, WeakAction> _ensureListeners()
        {
            if (_listeners == null)
            {
                _listeners = new EditableLookup <string, WeakAction>();
            }

            return(_listeners);
        }
Пример #2
0
        public static EditableLookup <K, T> ToEditableLookup <K, T>(this Dictionary <K, List <T> > source)
        {
            var res = new EditableLookup <K, T>();

            foreach (var k in source.Keys)
            {
                res.Reset(k, source[k]);
            }

            return(res);
        }