public void Add(Type type, ComponentFactoryCreateDelegate createFactory, ComponentFactoryWrapDelegate wrapFactory) { Int32 index = _creators.Count; _creators.Add(createFactory); _wrappers.Add(wrapFactory); _map.Add(type, index); }
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); }