/// <summary>
 /// Creates a delegate which can set the value of the field identified by <paramref name="fieldInfo"/>.
 /// </summary>
 public static MemberSetter DelegateForSetFieldValue(this FieldInfo fieldInfo)
 {
     return(Reflect.FieldSetter(fieldInfo));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a delegate which can set the value of the field specified by <paramref name="name"/> and
 /// matching <paramref name="bindingFlags"/> on the given <paramref name="type"/>.
 /// </summary>
 public static MemberSetter DelegateForSetFieldValue(this Type type, string name, FasterflectFlags bindingFlags)
 {
     return(Reflect.FieldSetter(type, name, bindingFlags));
 }
 /// <summary>
 /// Sets the instance field identified by <paramref name="fieldInfo"/> on the given <paramref name="obj"/>
 /// to the specified <paramref name="value" />.
 /// </summary>
 public static void Set(this FieldInfo fieldInfo, object obj, object value)
 {
     Reflect.FieldSetter(fieldInfo)(obj, value);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a delegate which can set the value of the field specified by <paramref name="name"/> on
 /// the given <paramref name="type"/>.
 /// </summary>
 public static MemberSetter DelegateForSetFieldValue(this Type type, string name)
 {
     return(Reflect.FieldSetter(type, name));
 }