File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/PackageRestore/Snapshots Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -9,27 +9,22 @@ namespace Microsoft.VisualStudio.ProjectSystem.PackageRestore;
9
9
/// Represents a reference item involved in package restore, with its associated metadata.
10
10
/// </summary>
11
11
[ DebuggerDisplay ( "Name = {Name}" ) ]
12
- internal sealed class ReferenceItem : IRestoreState < ReferenceItem >
12
+ internal sealed class ReferenceItem (
13
+ string name ,
14
+ IImmutableDictionary < string , string > metadata )
15
+ : IRestoreState < ReferenceItem >
13
16
{
14
- // If additional state is added to this class, please update RestoreHasher
15
-
16
- public ReferenceItem ( string name , IImmutableDictionary < string , string > metadata )
17
- {
18
- Requires . NotNullOrEmpty ( name ) ;
19
-
20
- Name = name ;
21
- Metadata = metadata ;
22
- }
17
+ // IMPORTANT: If additional state is added, update AddToHash and DescribeChanges below.
23
18
24
19
/// <summary>
25
20
/// Gets the name (item spec) of the reference.
26
21
/// </summary>
27
- public string Name { get ; }
22
+ public string Name { get ; } = name ;
28
23
29
24
/// <summary>
30
25
/// Gets the name/value pair metadata associated with the reference.
31
26
/// </summary>
32
- public IImmutableDictionary < string , string > Metadata { get ; }
27
+ public IImmutableDictionary < string , string > Metadata { get ; } = metadata ;
33
28
34
29
public void AddToHash ( IncrementalHasher hasher )
35
30
{
You can’t perform that action at this time.
0 commit comments