34 references to CacheResultType
Microsoft.Build (22)
BackEnd\BuildManager\BuildManager.cs (3)
2371
if (cacheResult.ResultType !=
CacheResultType
.CacheHit)
2377
else if (cacheResult.ResultType ==
CacheResultType
.CacheHit && cacheResult.ProxyTargets != null)
2384
else 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"/>)
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");
147
(
CacheResultType
)(int)experimentalResult.ResultType,
BackEnd\Components\ProjectCache\ProjectCacheService.cs (8)
642
if (pluginLogger.HasLoggedErrors || experimentalPluginLogger.HasLoggedErrors || cacheResult.ResultType ==
CacheResultType
.None)
647
if (cacheResult.ResultType ==
CacheResultType
.CacheHit)
661
string cacheResultType = cacheResult?.ResultType.ToString() ?? nameof(
CacheResultType
.None);
668
cacheResult ??= CacheResult.IndicateNonCacheHit(
CacheResultType
.CacheNotApplicable);
672
case
CacheResultType
.CacheHit:
690
case
CacheResultType
.CacheMiss:
701
case
CacheResultType
.CacheNotApplicable:
712
case
CacheResultType
.None: // Should not get here based on the throw above
Microsoft.Build.Engine.UnitTests (12)
ProjectCache\ProjectCacheTests.cs (12)
173
: CacheResult.IndicateNonCacheHit(
CacheResultType
.CacheMiss);
200
CacheResultType
.CacheHit => cacheResult.ProxyTargets != null
203
CacheResultType
.CacheMiss => 'M',
204
CacheResultType
.CacheNotApplicable => 'N',
205
CacheResultType
.None => 'E',
271
: Task.FromResult(CacheResult.IndicateNonCacheHit(
CacheResultType
.CacheNotApplicable));
329
?? CacheResult.IndicateNonCacheHit(
CacheResultType
.CacheMiss);
829
case
CacheResultType
.CacheHit:
832
case
CacheResultType
.CacheMiss:
834
case
CacheResultType
.CacheNotApplicable:
836
case
CacheResultType
.None:
1617
return Task.FromResult(CacheResult.IndicateNonCacheHit(
CacheResultType
.CacheNotApplicable));