forked from ThatRendle/Simple.Data
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleEmptyExpression.cs
More file actions
39 lines (33 loc) · 1.11 KB
/
SimpleEmptyExpression.cs
File metadata and controls
39 lines (33 loc) · 1.11 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
31
32
33
34
35
36
37
38
39
namespace Simple.Data
{
using System;
public class SimpleEmptyExpression : SimpleExpression, IEquatable<SimpleEmptyExpression>
{
public SimpleEmptyExpression() : base(null, null, SimpleExpressionType.Empty)
{
}
public bool Equals(SimpleEmptyExpression other)
{
return !ReferenceEquals(null, other);
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != typeof (SimpleEmptyExpression)) return false;
return Equals((SimpleEmptyExpression) obj);
}
public override int GetHashCode()
{
return 0;
}
public static bool operator ==(SimpleEmptyExpression left, SimpleEmptyExpression right)
{
return Equals(left, right);
}
public static bool operator !=(SimpleEmptyExpression left, SimpleEmptyExpression right)
{
return !Equals(left, right);
}
}
}