Skip to content

Commit 2c9a5a9

Browse files
authored
Replace object.Equals with Type equals operator (#656)
+semver:patch
1 parent ae0011f commit 2c9a5a9

26 files changed

+27
-27
lines changed

src/FluentNHibernate/Diagnostics/SkippedAutomappingType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public bool Equals(SkippedAutomappingType other)
1111
{
1212
if (ReferenceEquals(null, other)) return false;
1313
if (ReferenceEquals(this, other)) return true;
14-
return Equals(other.Type, Type) && Equals(other.Reason, Reason);
14+
return other.Type == Type && Equals(other.Reason, Reason);
1515
}
1616

1717
public override bool Equals(object obj)

src/FluentNHibernate/MappingModel/AnyMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public bool Equals(AnyMapping other)
8585
other.typeColumns.ContentEquals(typeColumns) &&
8686
other.identifierColumns.ContentEquals(identifierColumns) &&
8787
other.metaValues.ContentEquals(metaValues) &&
88-
Equals(other.ContainingEntityType, ContainingEntityType);
88+
other.ContainingEntityType == ContainingEntityType;
8989
}
9090

9191
public override bool Equals(object obj)

src/FluentNHibernate/MappingModel/CacheMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public bool Equals(CacheMapping other)
3636
{
3737
if (ReferenceEquals(null, other)) return false;
3838
if (ReferenceEquals(this, other)) return true;
39-
return Equals(other.attributes, attributes) && Equals(other.ContainedEntityType, ContainedEntityType);
39+
return Equals(other.attributes, attributes) && other.ContainedEntityType == ContainedEntityType;
4040
}
4141

4242
public override bool Equals(object obj)

src/FluentNHibernate/MappingModel/ClassBased/ComponentMappingBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public bool Equals(ComponentMappingBase other)
4747
if (ReferenceEquals(this, other)) return true;
4848
return base.Equals(other) &&
4949
Equals(other.attributes, attributes) &&
50-
Equals(other.ContainingEntityType, ContainingEntityType) &&
50+
other.ContainingEntityType == ContainingEntityType &&
5151
Equals(other.Member, Member);
5252
}
5353

src/FluentNHibernate/MappingModel/ClassBased/ReferenceComponentMapping.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ public bool Equals(ReferenceComponentMapping other)
139139
if (ReferenceEquals(null, other)) return false;
140140
if (ReferenceEquals(this, other)) return true;
141141
return Equals(other.property, property) &&
142-
Equals(other.componentType, componentType) &&
142+
other.componentType == componentType &&
143143
Equals(other.mergedComponent, mergedComponent) &&
144-
Equals(other.containingEntityType, containingEntityType);
144+
other.containingEntityType == containingEntityType;
145145
}
146146

147147
public override bool Equals(object obj)

src/FluentNHibernate/MappingModel/Collections/CollectionMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public bool Equals(CollectionMapping other)
116116
if (ReferenceEquals(this, other)) return true;
117117
return Equals(other.attributes, attributes) &&
118118
other.filters.ContentEquals(filters) &&
119-
Equals(other.ContainingEntityType, ContainingEntityType)
119+
other.ContainingEntityType == ContainingEntityType
120120
&& Equals(other.Member, Member);
121121
}
122122

src/FluentNHibernate/MappingModel/Collections/CompositeElementMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public bool Equals(CompositeElementMapping other)
6767
{
6868
if (ReferenceEquals(null, other)) return false;
6969
if (ReferenceEquals(this, other)) return true;
70-
return Equals(other.mappedMembers, mappedMembers) && Equals(other.attributes, attributes) && Equals(other.ContainingEntityType, ContainingEntityType);
70+
return Equals(other.mappedMembers, mappedMembers) && Equals(other.attributes, attributes) && other.ContainingEntityType == ContainingEntityType;
7171
}
7272

7373
public override bool Equals(object obj)

src/FluentNHibernate/MappingModel/Collections/ElementMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public bool Equals(ElementMapping other)
5353
if (ReferenceEquals(this, other)) return true;
5454
return other.columns.ContentEquals(columns) &&
5555
Equals(other.attributes, attributes) &&
56-
Equals(other.ContainingEntityType, ContainingEntityType);
56+
other.ContainingEntityType == ContainingEntityType;
5757
}
5858

5959
public override bool Equals(object obj)

src/FluentNHibernate/MappingModel/Collections/IndexManyToManyMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public bool Equals(IndexManyToManyMapping other)
5555
if (ReferenceEquals(this, other)) return true;
5656
return Equals(other.attributes, attributes) &&
5757
other.columns.ContentEquals(columns) &&
58-
Equals(other.ContainingEntityType, ContainingEntityType);
58+
other.ContainingEntityType == ContainingEntityType;
5959
}
6060

6161
public override bool Equals(object obj)

src/FluentNHibernate/MappingModel/Collections/IndexMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public bool Equals(IndexMapping other)
5353
if (ReferenceEquals(this, other)) return true;
5454
return Equals(other.attributes, attributes) &&
5555
other.columns.ContentEquals(columns) &&
56-
Equals(other.ContainingEntityType, ContainingEntityType);
56+
other.ContainingEntityType == ContainingEntityType;
5757
}
5858

5959
public override bool Equals(object obj)

0 commit comments

Comments
 (0)