示例#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));
 }