internal TemplateContext(string relativePath, string templateDirectory, ITemplateGeneratorHost host) { _templateDirectory = templateDirectory; _relativePath = relativePath; _host = host; _context = new Hashtable(); Hashtable globalContext = host.GetGlobalContext(); if( globalContext != null ) { foreach(DictionaryEntry entry in globalContext) _context.Add(entry.Key, entry.Value); } _directives = new Hashtable(); _imports = new Hashtable(); _assemblies = new Hashtable(); }
internal TemplateContext(string relativePath, string templateDirectory, ITemplateGeneratorHost host) { _templateDirectory = templateDirectory; _relativePath = relativePath; _host = host; _context = new Hashtable(); Hashtable globalContext = host.GetGlobalContext(); if (globalContext != null) { foreach (DictionaryEntry entry in globalContext) { _context.Add(entry.Key, entry.Value); } } _directives = new Hashtable(); _imports = new Hashtable(); _assemblies = new Hashtable(); }