Esempio n. 1
0
 /// <summary>Sets the specified template in the cache using the given name.</summary>
 /// <param name="name">The name.</param>
 /// <param name="templateAssemblyPath">The template assembly path.</param>
 /// <param name="templates">The template group.</param>
 /// <param name="timestamp">The time-stamp the template (NOT the assembly) was created.</param>
 public void Set(string name, string templateAssemblyPath, Dictionary <string, string> templates, DateTime timestamp)
 {
     cache[name] = new TemplateCacheItem()
     {
         Timestamp = timestamp,
         HashCode  = GetHashCode(templates),
         Value     = templateAssemblyPath
     };
 }
Esempio n. 2
0
 /// <summary>Sets the specified template in the cache using the given name.</summary>
 /// <param name="name">The name.</param>
 /// <param name="templateAssemblyPath">The template assembly path.</param>
 /// <param name="template">The template.</param>
 /// <param name="timestamp">The time-stamp the template (NOT the assembly) was created.</param>
 public void Set(string name, string templateAssemblyPath, string template, DateTime timestamp)
 {
     cache[name] = new TemplateCacheItem()
     {
         Timestamp = timestamp,
         HashCode  = template.GetHashCode(),
         Value     = templateAssemblyPath
     };
 }