34 references to CacheResultType
Microsoft.Build (21)
BackEnd\BuildManager\BuildManager.cs (3)
2282
if (cacheResult.ResultType !=
CacheResultType
.CacheHit)
2288
else if (cacheResult.ResultType ==
CacheResultType
.CacheHit && cacheResult.ProxyTargets != null)
2295
else 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"/>)
49
public
CacheResultType
ResultType { get; }
58
CacheResultType
resultType,
62
if (resultType ==
CacheResultType
.CacheHit)
76
ResultType =
CacheResultType
.None;
82
return new CacheResult(
CacheResultType
.CacheHit, buildResult);
87
return new CacheResult(
CacheResultType
.CacheHit, proxyTargets: proxyTargets);
94
return new CacheResult(
CacheResultType
.CacheHit, ConstructBuildResult(targetResults));
97
public static CacheResult IndicateNonCacheHit(
CacheResultType
resultType)
99
ErrorUtilities.VerifyThrow(resultType !=
CacheResultType
.CacheHit, "CantBeCacheHit");
BackEnd\Components\ProjectCache\ProjectCacheService.cs (8)
545
if (pluginLogger.HasLoggedErrors || cacheResult.ResultType ==
CacheResultType
.None)
550
if (cacheResult.ResultType ==
CacheResultType
.CacheHit)
564
string cacheResultType = cacheResult?.ResultType.ToString() ?? nameof(
CacheResultType
.None);
571
cacheResult ??= CacheResult.IndicateNonCacheHit(
CacheResultType
.CacheNotApplicable);
575
case
CacheResultType
.CacheHit:
593
case
CacheResultType
.CacheMiss:
604
case
CacheResultType
.CacheNotApplicable:
615
case
CacheResultType
.None: // Should not get here based on the throw above
Microsoft.Build.Engine.UnitTests (12)
ProjectCache\ProjectCacheTests.cs (12)
154
: CacheResult.IndicateNonCacheHit(
CacheResultType
.CacheMiss);
181
CacheResultType
.CacheHit => cacheResult.ProxyTargets != null
184
CacheResultType
.CacheMiss => 'M',
185
CacheResultType
.CacheNotApplicable => 'N',
186
CacheResultType
.None => 'E',
252
: Task.FromResult(CacheResult.IndicateNonCacheHit(
CacheResultType
.CacheNotApplicable));
310
?? CacheResult.IndicateNonCacheHit(
CacheResultType
.CacheMiss);
810
case
CacheResultType
.CacheHit:
813
case
CacheResultType
.CacheMiss:
815
case
CacheResultType
.CacheNotApplicable:
817
case
CacheResultType
.None:
1598
return Task.FromResult(CacheResult.IndicateNonCacheHit(
CacheResultType
.CacheNotApplicable));
ProjectCachePlugin (1)
AssemblyMockCache.cs (1)
54
return Task.FromResult(CacheResult.IndicateNonCacheHit(
CacheResultType
.CacheNotApplicable));