Skip to content

Commit f86b6e2

Browse files
authored
Fix typo: sorce -> source (#139)
* Fix typo * Fix typo: constent -> constant
1 parent dbff228 commit f86b6e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/AutoMapper.Extensions.ExpressionMapping/ExpressionMapper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ protected override Expression VisitBinary(BinaryExpression node)
9595
var newLeft = Visit(node.Left);
9696
var newRight = Visit(node.Right);
9797

98-
// check if the non-string expression is a null constent
98+
// check if the non-string expression is a null constant
9999
// as this would lead to a "null.ToString()" and thus an error when executing the expression
100100
if (newLeft.Type != newRight.Type && newRight.Type == typeof(string) && !IsNullConstant(newLeft))
101101
newLeft = Call(newLeft, typeof(object).GetDeclaredMethod("ToString"));
@@ -206,7 +206,7 @@ protected override Expression VisitMember(MemberExpression node)
206206
if (constantVisitor.IsConstant)
207207
return node;
208208

209-
SetSorceSubTypes(propertyMap);
209+
SetSourceSubTypes(propertyMap);
210210

211211
var replacedExpression = Visit(node.Expression);
212212
if (replacedExpression == node.Expression)
@@ -282,7 +282,7 @@ private PropertyMap GetExistingPropertyMapFor(MemberInfo destinationProperty, Ty
282282
return typeMap.PropertyMaps.FirstOrDefault(pm => pm.DestinationName == destinationProperty.Name);
283283
}
284284

285-
private void SetSorceSubTypes(PropertyMap propertyMap)
285+
private void SetSourceSubTypes(PropertyMap propertyMap)
286286
{
287287
if (propertyMap.SourceMember is PropertyInfo info)
288288
_destSubTypes = info.PropertyType.GetTypeInfo().GenericTypeArguments.Concat(new[] { info.PropertyType }).ToList();

0 commit comments

Comments
 (0)