private IList <TemplateModelCollection> GetTemplateCollections() { TemplateModelCollection v_collection = null; _templateFilesCollection.Clear(); foreach (string v_templateFile in _templateFiles) { Logger.Debug("\n=====================================START TEMPLATE FILE======================================="); Logger.Debug(String.Format("Processing template file => {0}", v_templateFile)); _templateProvider.LoadTemplate(v_templateFile); Logger.Debug(String.Format("Template file '{0}' loaded successfully", v_templateFile)); v_collection = _templateProvider.GetAllTemplates(); Logger.Debug(String.Format("Got {0} templates from the processed file", v_collection.Count)); Logger.Debug("=======================================END TEMPLATE FILE=======================================\n"); _templateFilesCollection.Add(v_collection); //yield return v_collection; } //yield break; Logger.Debug(String.Format("Returning {0} number of TemplateModelCollection(s), each containing ITemplate Models", _templateFilesCollection.Count)); return(_templateFilesCollection); }