forked from aspnet/AspNetWebStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefaultExpressionFingerprint.cs
More file actions
31 lines (26 loc) · 1.14 KB
/
Copy pathDefaultExpressionFingerprint.cs
File metadata and controls
31 lines (26 loc) · 1.14 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
// 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 System.Diagnostics.CodeAnalysis;
using System.Linq.Expressions;
#pragma warning disable 659 // overrides AddToHashCodeCombiner instead
namespace System.Web.Mvc.ExpressionUtil
{
// DefaultExpression fingerprint class
// Expression of form default(T)
[SuppressMessage("Microsoft.Usage", "CA2218:OverrideGetHashCodeOnOverridingEquals", Justification = "Overrides AddToHashCodeCombiner() instead.")]
internal sealed class DefaultExpressionFingerprint : ExpressionFingerprint
{
public DefaultExpressionFingerprint(ExpressionType nodeType, Type type)
: base(nodeType, type)
{
// There are no properties on DefaultExpression that are worth including in
// the fingerprint.
}
public override bool Equals(object obj)
{
DefaultExpressionFingerprint other = obj as DefaultExpressionFingerprint;
return (other != null)
&& this.Equals(other);
}
}
}