Пример #1
0
 public bool TryGetCacheEntryWithTypeName(string typeFullName, IReadOnlyCollection <string> includeDirectories,
                                          out IncludeCacheEntry cacheEntry)
 {
     cacheEntry = Cache.Values.FirstOrDefault(v => v.Types.Contains(typeFullName) &&
                                              includeDirectories.Contains(v.BaseDirectory));
     return(cacheEntry != null);
 }
Пример #2
0
 public IncludeFindResult(IncludeCacheEntry includeCacheEntry)
 {
     IncludeCacheEntry = includeCacheEntry;
 }
Пример #3
0
 public void AddEntry(IncludeCacheEntry cacheEntry)
 {
     cache.LogInformation($"Added the following entry from the include cache:{Environment.NewLine}" +
                          $"{JsonConvert.SerializeObject(cacheEntry, Formatting.Indented)}");
     cache.Cache.Add(cacheEntry.File, cacheEntry);
 }
Пример #4
0
 public bool TryGetCacheEntry(string pathToInclude, out IncludeCacheEntry cacheEntry)
 {
     return(Cache.TryGetValue(pathToInclude, out cacheEntry));
 }