Skip to content

Commit

Permalink
#7469 Renamed extension method to avoid ambiguous signature
Browse files Browse the repository at this point in the history
  • Loading branch information
bergmania committed Jan 24, 2020
1 parent 7fbe482 commit 05fe604
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static class PublishedElementExtensions
/// <summary>
/// Gets the value of a property.
/// </summary>
public static TValue Value<TModel, TValue>(this TModel model, Expression<Func<TModel, TValue>> property, string culture = null, string segment = null, Fallback fallback = default, TValue defaultValue = default)
public static TValue ValueFor<TModel, TValue>(this TModel model, Expression<Func<TModel, TValue>> property, string culture = null, string segment = null, Fallback fallback = default, TValue defaultValue = default)
where TModel : IPublishedElement
{
var alias = GetAlias(model, property);
Expand Down Expand Up @@ -45,7 +45,7 @@ private static string GetAlias<TModel, TValue>(TModel model, Expression<Func<TMo
var attribute = member.GetCustomAttribute<ImplementPropertyTypeAttribute>();
if (attribute == null)
throw new InvalidOperationException("Property is not marked with ImplementPropertyType attribute.");

return attribute.Alias;
}
}
Expand Down

0 comments on commit 05fe604

Please sign in to comment.