Esempio n. 1
0
        public void Add(Type type, ComponentFactoryCreateDelegate createFactory, ComponentFactoryWrapDelegate wrapFactory)
        {
            Int32 index = _creators.Count;

            _creators.Add(createFactory);
            _wrappers.Add(wrapFactory);
            _map.Add(type, index);
        }
Esempio n. 2
0
        public Boolean TryGetWrapper(Type type, out Int32 index, out ComponentFactoryWrapDelegate factory)
        {
            if (_map.TryGetValue(type, out index))
            {
                factory = _wrappers[index];
                return(true);
            }

            factory = null;
            return(false);
        }