public static TemplateHolder <T> Of <T>() { Type clazz = typeof(T); TemplateHolder <T> template = null; if (!templates.ContainsKey(clazz)) { template = new TemplateHolder <T>(); templates.Add(clazz, template); } else { template = (TemplateHolder <T>)templates [clazz]; } return(template); }
public ObjectFactory(TemplateHolder <T> templateHolder) { _templateHolder = templateHolder; }