-
Notifications
You must be signed in to change notification settings - Fork 414
Expand file tree
/
Copy pathSolutionBuildContext.cs
More file actions
30 lines (26 loc) · 1.26 KB
/
SolutionBuildContext.cs
File metadata and controls
30 lines (26 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE.md file in the project root for more information.
using Microsoft.VisualStudio.IO;
namespace Microsoft.VisualStudio.ProjectSystem.UpToDate;
/// <summary>
/// A context for the up-to-date check with the lifetime of the solution build, which
/// may span multiple project builds.
/// </summary>
internal sealed class SolutionBuildContext
{
/// <summary>
/// A cache of timestamps for the absolute paths of both source and target of copy items
/// across all projects.
/// </summary>
/// <remarks>
/// In large solutions we end up checking many, many copy items. These items get their
/// own cache that lasts the duration of the solution build, rather than the default cache
/// which only lasts for the project build. This cache has a high hit rate. As project
/// builds complete, we clear each project's output items from the cache so that we re-query
/// them on the next call.
/// </remarks>
public ITimestampCache CopyItemTimestamps { get; }
public SolutionBuildContext(IFileSystem fileSystem)
{
CopyItemTimestamps = new ConcurrentTimestampCache(fileSystem);
}
}