-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSchedulableAction.cs
41 lines (34 loc) · 1.1 KB
/
SchedulableAction.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
using System.Collections.Generic;
using System.Linq;
namespace cake
{
public class SchedulableAction
{
public TargetGenerateSettings Settings;
public IEnumerable<string> InputFilesRequiringGeneration;
public SchedulableAction(TargetGenerateSettings generateSettings)
: this(generateSettings, new List<string>())
{
}
public SchedulableAction(TargetGenerateSettings generateSettings, IEnumerable<string> inputFilesRequiringGeneration)
{
Settings = generateSettings;
InputFilesRequiringGeneration = inputFilesRequiringGeneration;
}
public override bool Equals(System.Object obj)
{
if (obj == null)
return false;
var other = obj as SchedulableAction;
if ((System.Object) other == null) //the cast here is required even if resharper thinks it isn't
return false;
bool equals1 = Equals(other.Settings, Settings);
bool equals2 = other.InputFilesRequiringGeneration.SequenceEqual(InputFilesRequiringGeneration);
return equals1 && equals2;
}
public override int GetHashCode()
{
return Settings.GetHashCode() ^ InputFilesRequiringGeneration.GetHashCode();
}
}
}