6 instantiations of CacheResult
Microsoft.Build (6)
BackEnd\Components\ProjectCache\CacheResult.cs (6)
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); 146return new CacheResult(
50 references to CacheResult
Microsoft.Build (17)
BackEnd\BuildManager\BuildManager.cs (1)
2349internal void PostCacheResult(CacheRequest cacheRequest, CacheResult cacheResult, int projectContextId)
BackEnd\Components\ProjectCache\CacheResult.cs (6)
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) 139internal static CacheResult FromExperimental(Experimental.ProjectCache.CacheResult experimentalResult)
BackEnd\Components\ProjectCache\ProjectCachePluginBase.cs (1)
34public abstract Task<CacheResult> GetCacheResultAsync(
BackEnd\Components\ProjectCache\ProjectCacheService.cs (9)
519(CacheResult cacheResult, int projectContextId) = await ProcessCacheRequestAsync(); 524_buildManager.PostCacheResult(cacheRequest, CacheResult.IndicateException(e), BuildEventContext.InvalidProjectContextId); 529async ValueTask<(CacheResult Result, int ProjectContextId)> ProcessCacheRequestAsync() 542CacheResult cacheResult; 550cacheResult = CacheResult.IndicateException(ex); 579private async ValueTask<CacheResult> GetCacheResultAsync(BuildRequestData buildRequest, BuildRequestConfiguration buildRequestConfiguration, BuildEventContext buildEventContext, CancellationToken cancellationToken) 606CacheResult? cacheResult = null; 634cacheResult = CacheResult.FromExperimental(cacheResultExp); 668cacheResult ??= CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable);
Microsoft.Build.Engine.UnitTests (33)
ProjectCache\ProjectCacheTests.cs (33)
117public Dictionary<int, CacheResult> NonCacheMissResults { get; } 119public GraphCacheResponse(Dictionary<int, int[]?> graphEdges, Dictionary<int, CacheResult>? nonCacheMissResults = null, IDictionary<int, string>? extraContentPerProjectNumber = null) 123NonCacheMissResults = nonCacheMissResults ?? new Dictionary<int, CacheResult>(); 133public static CacheResult SuccessfulProxyTargetResult() 135return CacheResult.IndicateCacheHit( 143public static CacheResult SuccessfulTargetResult(int projectNumber, string projectPath) 145return CacheResult.IndicateCacheHit( 164public CacheResult GetExpectedCacheResultForNode(ProjectGraphNode node) 169public CacheResult GetExpectedCacheResultForProjectNumber(int projectNumber) 171return NonCacheMissResults.TryGetValue(projectNumber, out var cacheResult) 173: CacheResult.IndicateNonCacheHit(CacheResultType.CacheMiss); 196var cacheResult = GetExpectedCacheResultForProjectNumber(projectNumber); 214private readonly Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>> _getCacheResultDelegate; 216public DelegatingMockCache(Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>> getCacheResultDelegate) 226public override async Task<CacheResult> GetCacheResultAsync(BuildRequestData buildRequest, PluginLoggerBase logger, CancellationToken cancellationToken) 255public Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>>? GetCacheResultImplementation { get; set; } 264public override Task<CacheResult> GetCacheResultAsync( 271: Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable)); 307public override async Task<CacheResult> GetCacheResultAsync( 329?? CacheResult.IndicateNonCacheHit(CacheResultType.CacheMiss); 341public CacheResult GetCacheResultForNode(ProjectGraphNode node) 366new Dictionary<int, CacheResult> 376new Dictionary<int, CacheResult> 392new Dictionary<int, CacheResult> 402new Dictionary<int, CacheResult> 412new Dictionary<int, CacheResult> 753new Dictionary<int, CacheResult> 826var expectedCacheResponse = testData.GetExpectedCacheResultForNode(node); 858CacheResult expectedCacheResponse) 988new Dictionary<int, CacheResult> 9912, CacheResult.IndicateCacheHit( 1617return Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable)); 1623CacheResult.IndicateCacheHit(