src/Mimp.SeeSharper.Reflection/FieldInfoExtensions.cs
/// <summary>
/// Return a compield action to assign the field.
/// </summary>
/// <typeparam name="TInstance"></typeparam>
/// <typeparam name="TField"></typeparam>
/// <param name="field"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException"></exception>
Return a compield action to assign the field.
Return a compield action to assign the field .
public static Action<TInstance, TField> GetInstanceAssignAction<TInstance, TField>(this FieldInfo field)
            where TInstance : notnull
        {
            if (field is null)
                throw new ArgumentNullException(nameof(field));
            return field.GetInstanceAssignDelegate<Action<TInstance, TField?>>();
        }
public static Action < TInstance , TField > GetInstanceAssignAction < TInstance , TField > ( this FieldInfo field ) where TInstance : notnull { if ( field is null ) throw new ArgumentNullException ( nameof ( field ) ) ; return field . GetInstanceAssignDelegate < Action < TInstance , TField ? > > ( ) ; }
Return a compield action to assign the field.
Return a compield action to assign the field .
None
None
FieldInfo
this
field
None
typeparam
None
typeparam
None