forked from DarthFubuMVC/fubumvc
/
FileOutputReport.cs
executable file
·44 lines (40 loc) · 1.6 KB
/
FileOutputReport.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
namespace FubuMVC.Core.Diagnostics
{
public class FileOutputReport : IBehaviorDetails
{
public string ContentType;
public string LocalFilePath;
public string DisplayName;
public void AcceptVisitor(IBehaviorDetailsVisitor visitor)
{
visitor.FileOutput(this);
}
public bool Equals(FileOutputReport other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return Equals(other.ContentType, ContentType) && Equals(other.LocalFilePath, LocalFilePath) && Equals(other.DisplayName, DisplayName);
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != typeof (FileOutputReport)) return false;
return Equals((FileOutputReport) obj);
}
public override int GetHashCode()
{
unchecked
{
int result = (ContentType != null ? ContentType.GetHashCode() : 0);
result = (result*397) ^ (LocalFilePath != null ? LocalFilePath.GetHashCode() : 0);
result = (result*397) ^ (DisplayName != null ? DisplayName.GetHashCode() : 0);
return result;
}
}
public override string ToString()
{
return string.Format("ContentType: {0}, LocalFilePath: {1}, DisplayName: {2}", ContentType, LocalFilePath, DisplayName);
}
}
}