public void SetClrValue(object instance, object?clrValue) { if (SetValueHandler != null) { Debug.Assert(clrValue != DBNull.Value); SetValueHandler.Invoke(instance, clrValue); } else { throw new MicroOrmException($"Property '{PropertyName}' is not writable."); } }
/// <param name="sqlRawValue">Может быть <see cref="DBNull"/>.</param> /// <param name="sqlColumnName">Используется только для ошибок.</param> public void ConvertAndSetValue(object instance, object sqlRawValue, Type sqlColumnType, string sqlColumnName) { if (SetValueHandler != null) { object?clrValue = ConvertSqlToClrValue(sqlRawValue, sqlColumnType, sqlColumnName); SetValueHandler.Invoke(instance, clrValue); } else { throw new MicroOrmException($"Property '{PropertyName}' is not writable."); } }
public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture) { OnSetValue?.Invoke(this, obj, value); }
private void Set(Control ctl, string key, string value) { svh = new SetValueHandler(SetControlValue); svh.Invoke(ctl,key,value); svh.Invoke(ctl, key, value); }
private void Set(Control ctl, string key, string value) { svh = new SetValueHandler(SetControlValue); svh.Invoke(ctl, key, value); svh.Invoke(ctl, key, value); }