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)
2531internal 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)
115public Dictionary<int, CacheResult> NonCacheMissResults { get; } 117public GraphCacheResponse(Dictionary<int, int[]?> graphEdges, Dictionary<int, CacheResult>? nonCacheMissResults = null, IDictionary<int, string>? extraContentPerProjectNumber = null) 121NonCacheMissResults = nonCacheMissResults ?? new Dictionary<int, CacheResult>(); 131public static CacheResult SuccessfulProxyTargetResult() 133return CacheResult.IndicateCacheHit( 141public static CacheResult SuccessfulTargetResult(int projectNumber, string projectPath) 143return CacheResult.IndicateCacheHit( 162public CacheResult GetExpectedCacheResultForNode(ProjectGraphNode node) 167public CacheResult GetExpectedCacheResultForProjectNumber(int projectNumber) 169return NonCacheMissResults.TryGetValue(projectNumber, out var cacheResult) 171: CacheResult.IndicateNonCacheHit(CacheResultType.CacheMiss); 194var cacheResult = GetExpectedCacheResultForProjectNumber(projectNumber); 212private readonly Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>> _getCacheResultDelegate; 214public DelegatingMockCache(Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>> getCacheResultDelegate) 224public override async Task<CacheResult> GetCacheResultAsync(BuildRequestData buildRequest, PluginLoggerBase logger, CancellationToken cancellationToken) 253public Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>>? GetCacheResultImplementation { get; set; } 262public override Task<CacheResult> GetCacheResultAsync( 269: Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable)); 305public override async Task<CacheResult> GetCacheResultAsync( 327?? CacheResult.IndicateNonCacheHit(CacheResultType.CacheMiss); 339public CacheResult GetCacheResultForNode(ProjectGraphNode node) 364new Dictionary<int, CacheResult> 374new Dictionary<int, CacheResult> 390new Dictionary<int, CacheResult> 400new Dictionary<int, CacheResult> 410new Dictionary<int, CacheResult> 751new Dictionary<int, CacheResult> 824var expectedCacheResponse = testData.GetExpectedCacheResultForNode(node); 856CacheResult expectedCacheResponse) 986new Dictionary<int, CacheResult> 9892, CacheResult.IndicateCacheHit( 1615return Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable)); 1621CacheResult.IndicateCacheHit(