public void ExecuteCommand(CommandProxy commandProxy) { var executeMethod = _invoker.GetType().GetMethods().Single(m => m.CustomAttributes.Any(a => a.AttributeType == typeof(InvokeCommandAttribute))); executeMethod.Invoke(_invoker, new[] { commandProxy.Proxy }); }
public void ExecuteCommand(CommandProxy commandProxy) { var executeMethod = _invoker.GetType().GetMethods().Single(m => m.CustomAttributes.Any(a => a.AttributeType == typeof(InvokeCommandAttribute))); executeMethod.Invoke(_invoker, new[] {commandProxy.Proxy}); }