public PropertyGetSetResult <TMarshal> Execute(PropertySetExecution <TMarshal> propertySetExecution) { GetPropertyDescriptor(propertySetExecution.ObjectId, propertySetExecution.PropertyId, out var propertyDescriptor, out var objectDescriptor); var result = new PropertyGetSetResult <TMarshal> { ExecutionId = propertySetExecution.ExecutionId }; try { propertyDescriptor.Setter(objectDescriptor.Object, this.BindToNet( new Binding <TMarshal> { Value = propertySetExecution.Value, TargetType = propertyDescriptor.Type })); result.Success = true; } catch (Exception e) { result.Error = e.Message; } return(result); }
private void OnPropertySetExecution(PropertySetExecution <TMarshal> propertySetExecution) { var result = propertyExecutor.Execute(propertySetExecution); connection.Send(new RpcRequest <TMarshal>() { PropertyResult = result }); }