src/Mimp.SeeSharper.Reflection/PropertyInfoExtensions.cs
/// <summary>
/// Return a compiled function to access the property.
/// </summary>
/// <typeparam name="TInstance"></typeparam>
/// <typeparam name="TProperty"></typeparam>
/// <param name="property"></param>
/// <returns></returns>
Return a compiled function to access the property.
Return a compiled function to access the property .
public static Func<TInstance, TProperty> GetInstanceAccessFunc<TInstance, TProperty>(this PropertyInfo property)
            where TInstance : notnull
        {
            if (property is null)
                throw new ArgumentNullException(nameof(property));
            return property.GetInstanceAccessDelegate<Func<TInstance, TProperty>>();
        }
public static Func < TInstance , TProperty > GetInstanceAccessFunc < TInstance , TProperty > ( this PropertyInfo property ) where TInstance : notnull { if ( property is null ) throw new ArgumentNullException ( nameof ( property ) ) ; return property . GetInstanceAccessDelegate < Func < TInstance , TProperty > > ( ) ; }
Return a compiled function to access the property.
Return a compiled function to access the property .
None
PropertyInfo
this
property
None
typeparam
None
typeparam
None