34 references to CacheResultType
Microsoft.Build (21)
BackEnd\BuildManager\BuildManager.cs (3)
2297if (cacheResult.ResultType != CacheResultType.CacheHit) 2303else if (cacheResult.ResultType == CacheResultType.CacheHit && cacheResult.ProxyTargets != null) 2310else if (cacheResult.ResultType == CacheResultType.CacheHit && cacheResult.BuildResult != null)
BackEnd\Components\ProjectCache\CacheResult.cs (10)
43/// Results representing cache hits (with <see cref="ResultType"/> == <see cref="CacheResultType.CacheHit"/>) 49public CacheResultType ResultType { get; } 58CacheResultType resultType, 62if (resultType == CacheResultType.CacheHit) 76ResultType = CacheResultType.None; 82return new CacheResult(CacheResultType.CacheHit, buildResult); 87return new CacheResult(CacheResultType.CacheHit, proxyTargets: proxyTargets); 94return new CacheResult(CacheResultType.CacheHit, ConstructBuildResult(targetResults)); 97public static CacheResult IndicateNonCacheHit(CacheResultType resultType) 99ErrorUtilities.VerifyThrow(resultType != CacheResultType.CacheHit, "CantBeCacheHit");
BackEnd\Components\ProjectCache\ProjectCacheService.cs (8)
546if (pluginLogger.HasLoggedErrors || cacheResult.ResultType == CacheResultType.None) 551if (cacheResult.ResultType == CacheResultType.CacheHit) 565string cacheResultType = cacheResult?.ResultType.ToString() ?? nameof(CacheResultType.None); 572cacheResult ??= CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable); 576case CacheResultType.CacheHit: 594case CacheResultType.CacheMiss: 605case CacheResultType.CacheNotApplicable: 616case CacheResultType.None: // Should not get here based on the throw above
Microsoft.Build.Engine.UnitTests (12)
ProjectCache\ProjectCacheTests.cs (12)
157: CacheResult.IndicateNonCacheHit(CacheResultType.CacheMiss); 184CacheResultType.CacheHit => cacheResult.ProxyTargets != null 187CacheResultType.CacheMiss => 'M', 188CacheResultType.CacheNotApplicable => 'N', 189CacheResultType.None => 'E', 255: Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable)); 313?? CacheResult.IndicateNonCacheHit(CacheResultType.CacheMiss); 813case CacheResultType.CacheHit: 816case CacheResultType.CacheMiss: 818case CacheResultType.CacheNotApplicable: 820case CacheResultType.None: 1601return Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable));
ProjectCachePlugin (1)
AssemblyMockCache.cs (1)
54return Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable));