5 instantiations of CacheResult
Microsoft.Build (5)
BackEnd\Components\ProjectCache\CacheResult.cs (5)
82return new CacheResult(CacheResultType.CacheHit, buildResult); 87return new CacheResult(CacheResultType.CacheHit, proxyTargets: proxyTargets); 94return new CacheResult(CacheResultType.CacheHit, ConstructBuildResult(targetResults)); 100return new CacheResult(resultType); 105return new CacheResult(e);
50 references to CacheResult
Microsoft.Build (15)
BackEnd\BuildManager\BuildManager.cs (1)
2260internal void PostCacheResult(CacheRequest cacheRequest, CacheResult cacheResult, int projectContextId)
BackEnd\Components\ProjectCache\CacheResult.cs (5)
80public static CacheResult IndicateCacheHit(BuildResult buildResult) 85public static CacheResult IndicateCacheHit(ProxyTargets proxyTargets) 90public static CacheResult IndicateCacheHit(IReadOnlyCollection<PluginTargetResult> targetResults) 97public static CacheResult IndicateNonCacheHit(CacheResultType resultType) 103internal static CacheResult IndicateException(Exception e)
BackEnd\Components\ProjectCache\ProjectCachePluginBase.cs (1)
34public abstract Task<CacheResult> GetCacheResultAsync(
BackEnd\Components\ProjectCache\ProjectCacheService.cs (8)
441(CacheResult cacheResult, int projectContextId) = await ProcessCacheRequestAsync(); 446_buildManager.PostCacheResult(cacheRequest, CacheResult.IndicateException(e), BuildEventContext.InvalidProjectContextId); 451async Task<(CacheResult Result, int ProjectContextId)> ProcessCacheRequestAsync() 464CacheResult cacheResult; 472cacheResult = CacheResult.IndicateException(ex); 501private async Task<CacheResult> GetCacheResultAsync(BuildRequestData buildRequest, BuildRequestConfiguration buildRequestConfiguration, BuildEventContext buildEventContext, CancellationToken cancellationToken) 524CacheResult? cacheResult = null; 571cacheResult ??= CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable);
Microsoft.Build.Engine.UnitTests (33)
ProjectCache\ProjectCacheTests.cs (33)
98public Dictionary<int, CacheResult> NonCacheMissResults { get; } 100public GraphCacheResponse(Dictionary<int, int[]?> graphEdges, Dictionary<int, CacheResult>? nonCacheMissResults = null, IDictionary<int, string>? extraContentPerProjectNumber = null) 104NonCacheMissResults = nonCacheMissResults ?? new Dictionary<int, CacheResult>(); 114public static CacheResult SuccessfulProxyTargetResult() 116return CacheResult.IndicateCacheHit( 124public static CacheResult SuccessfulTargetResult(int projectNumber, string projectPath) 126return CacheResult.IndicateCacheHit( 145public CacheResult GetExpectedCacheResultForNode(ProjectGraphNode node) 150public CacheResult GetExpectedCacheResultForProjectNumber(int projectNumber) 152return NonCacheMissResults.TryGetValue(projectNumber, out var cacheResult) 154: CacheResult.IndicateNonCacheHit(CacheResultType.CacheMiss); 177var cacheResult = GetExpectedCacheResultForProjectNumber(projectNumber); 195private readonly Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>> _getCacheResultDelegate; 197public DelegatingMockCache(Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>> getCacheResultDelegate) 207public override async Task<CacheResult> GetCacheResultAsync(BuildRequestData buildRequest, PluginLoggerBase logger, CancellationToken cancellationToken) 236public Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>>? GetCacheResultImplementation { get; set; } 245public override Task<CacheResult> GetCacheResultAsync( 252: Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable)); 288public override async Task<CacheResult> GetCacheResultAsync( 310?? CacheResult.IndicateNonCacheHit(CacheResultType.CacheMiss); 322public CacheResult GetCacheResultForNode(ProjectGraphNode node) 347new Dictionary<int, CacheResult> 357new Dictionary<int, CacheResult> 373new Dictionary<int, CacheResult> 383new Dictionary<int, CacheResult> 393new Dictionary<int, CacheResult> 734new Dictionary<int, CacheResult> 807var expectedCacheResponse = testData.GetExpectedCacheResultForNode(node); 839CacheResult expectedCacheResponse) 969new Dictionary<int, CacheResult> 9722, CacheResult.IndicateCacheHit( 1598return Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable)); 1604CacheResult.IndicateCacheHit(
ProjectCachePlugin (2)
AssemblyMockCache.cs (2)
43public override Task<CacheResult> GetCacheResultAsync( 54return Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable));