public void AssignTo(object target) { foreach (string field in Fields) { IMemberBind bind = RuntimeHost.Binder.BindToMember(target, field, false); if (bind != null) { bind.SetValue(fields[field]); } //RuntimeHost.Binder.Set(field, target, fields[field], false); } }
private void SetMember(IScriptContext context, object obj, object value) { IMemberBind bind = RuntimeHost.Binder.BindToMember(obj, Identifier, true); if (bind == null) { throw new ScriptIdNotFoundException(Identifier); } bind.SetValue(value); context.Result = value; //Context.Result = RuntimeHost.Binder.Set(Identifier, obj, value); }