34 references to CacheResultType
Microsoft.Build (22)
BackEnd\BuildManager\BuildManager.cs (3)
2553if (cacheResult.ResultType != CacheResultType.CacheHit) 2559else if (cacheResult.ResultType == CacheResultType.CacheHit && cacheResult.ProxyTargets != null) 2566else if (cacheResult.ResultType == CacheResultType.CacheHit && cacheResult.BuildResult != null)
BackEnd\Components\ProjectCache\CacheResult.cs (11)
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"); 147(CacheResultType)(int)experimentalResult.ResultType,
BackEnd\Components\ProjectCache\ProjectCacheService.cs (8)
642if (pluginLogger.HasLoggedErrors || experimentalPluginLogger.HasLoggedErrors || cacheResult.ResultType == CacheResultType.None) 647if (cacheResult.ResultType == CacheResultType.CacheHit) 661string cacheResultType = cacheResult?.ResultType.ToString() ?? nameof(CacheResultType.None); 668cacheResult ??= CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable); 672case CacheResultType.CacheHit: 690case CacheResultType.CacheMiss: 701case CacheResultType.CacheNotApplicable: 712case CacheResultType.None: // Should not get here based on the throw above
Microsoft.Build.Engine.UnitTests (12)
ProjectCache\ProjectCacheTests.cs (12)
171: CacheResult.IndicateNonCacheHit(CacheResultType.CacheMiss); 198CacheResultType.CacheHit => cacheResult.ProxyTargets != null 201CacheResultType.CacheMiss => 'M', 202CacheResultType.CacheNotApplicable => 'N', 203CacheResultType.None => 'E', 269: Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable)); 327?? CacheResult.IndicateNonCacheHit(CacheResultType.CacheMiss); 827case CacheResultType.CacheHit: 830case CacheResultType.CacheMiss: 832case CacheResultType.CacheNotApplicable: 834case CacheResultType.None: 1615return Task.FromResult(CacheResult.IndicateNonCacheHit(CacheResultType.CacheNotApplicable));