-
Notifications
You must be signed in to change notification settings - Fork 692
/
ProjectRestoreSettings.cs
53 lines (45 loc) · 1.55 KB
/
ProjectRestoreSettings.cs
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using NuGet.Shared;
namespace NuGet.ProjectModel
{
/// <summary>
/// This class is used to hold restore related, project specific settings.
/// </summary>
public class ProjectRestoreSettings
{
/// <summary>
/// Bool property is used inr estore command to not log errors and warning.
/// Currently this is only being used for net core based projects on nomination.
/// </summary>
public bool HideWarningsAndErrors { get; set; } = false;
public ProjectRestoreSettings Clone()
{
var clonedObject = new ProjectRestoreSettings();
clonedObject.HideWarningsAndErrors = HideWarningsAndErrors;
return clonedObject;
}
public override bool Equals(object obj)
{
return Equals(obj as ProjectRestoreSettings);
}
public bool Equals(ProjectRestoreSettings other)
{
if (other == null)
{
return false;
}
if (ReferenceEquals(this, other))
{
return true;
}
return HideWarningsAndErrors == other.HideWarningsAndErrors;
}
public override int GetHashCode()
{
var hashCode = new HashCodeCombiner();
hashCode.AddObject(HideWarningsAndErrors);
return hashCode.CombinedHash;
}
}
}