Example #1
0
 private void CacheTaskDefinition(string taskKey, TaskDefinition taskDefinition)
 {
     if (_cachedTaskDefinitions.ContainsKey(taskKey))
     {
         _cachedTaskDefinitions[taskKey] = new CachedTaskDefinition()
         {
             TaskDefinition = taskDefinition,
             CachedAt       = DateTime.UtcNow
         };
     }
     else
     {
         _cachedTaskDefinitions.Add(taskKey, new CachedTaskDefinition()
         {
             TaskDefinition = taskDefinition,
             CachedAt       = DateTime.UtcNow
         });
     }
 }
 private void CacheTaskDefinition(string taskKey, TaskDefinition taskDefinition)
 {
     if (_cachedTaskDefinitions.ContainsKey(taskKey))
     {
         _cachedTaskDefinitions[taskKey] = new CachedTaskDefinition()
         {
             TaskDefinition = taskDefinition,
             CachedAt = DateTime.UtcNow
         };
     }
     else
     {
         _cachedTaskDefinitions.Add(taskKey, new CachedTaskDefinition()
         {
             TaskDefinition = taskDefinition,
             CachedAt = DateTime.UtcNow
         });
     }
 }