Exemplo 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);
        }
Exemplo n.º 2
0
        public Boolean TryGetCreator(Int32 index, out ComponentFactoryCreateDelegate factory)
        {
            if (index >= 0 && index < _creators.Count)
            {
                factory = _creators[index];
                return(true);
            }

            factory = null;
            return(false);
        }