{"action":"created","issue":{"url":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/802","labels_url":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/802/labels{/name}","comments_url":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/802/comments","events_url":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/802/events","html_url":"https://github.com/reactiveui/ReactiveUI/issues/802","id":56948918,"number":802,"title":"ReactiveCommand.Create method that takes an Action<object>","user":{"login":"distantcam","id":1298847,"avatar_url":"https://avatars.githubusercontent.com/u/1298847?v=3","gravatar_id":"","url":"https://api.github.com/users/distantcam","html_url":"https://github.com/distantcam","followers_url":"https://api.github.com/users/distantcam/followers","following_url":"https://api.github.com/users/distantcam/following{/other_user}","gists_url":"https://api.github.com/users/distantcam/gists{/gist_id}","starred_url":"https://api.github.com/users/distantcam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distantcam/subscriptions","organizations_url":"https://api.github.com/users/distantcam/orgs","repos_url":"https://api.github.com/users/distantcam/repos","events_url":"https://api.github.com/users/distantcam/events{/privacy}","received_events_url":"https://api.github.com/users/distantcam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/reactiveui/ReactiveUI/labels/Feature%20Request","name":"Feature Request","color":"ededed"},{"url":"https://api.github.com/repos/reactiveui/ReactiveUI/labels/vNext","name":"vNext","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-08T11:51:46Z","updated_at":"2015-05-22T07:26:00Z","closed_at":null,"body":"With C# 6 coming there's some nice syntax saving to be made with ViewModels.\r\n\r\n    public ICommand MyObservableCommand => ReactiveCommand.CreateAsyncObservable(MyObservableMethod);\r\n    public ICommand MyTaskCommand => ReactiveCommand.CreateAsyncTask(MyTaskMethod);\r\n\r\nIt would be nice if it was also possible to do this with commands that just take an `Action<object>` as well.\r\n\r\n    public ICommand MyCommand => ReactiveCommand.Create(MyMethod);"},"comment":{"url":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/comments/104545941","html_url":"https://github.com/reactiveui/ReactiveUI/issues/802#issuecomment-104545941","issue_url":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/802","id":104545941,"user":{"login":"kentcb","id":1901832,"avatar_url":"https://avatars.githubusercontent.com/u/1901832?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcb","html_url":"https://github.com/kentcb","followers_url":"https://api.github.com/users/kentcb/followers","following_url":"https://api.github.com/users/kentcb/following{/other_user}","gists_url":"https://api.github.com/users/kentcb/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcb/subscriptions","organizations_url":"https://api.github.com/users/kentcb/orgs","repos_url":"https://api.github.com/users/kentcb/repos","events_url":"https://api.github.com/users/kentcb/events{/privacy}","received_events_url":"https://api.github.com/users/kentcb/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T07:26:00Z","updated_at":"2015-05-22T07:26:00Z","body":"This seems dangerous to me, since every access to the property would be creating a new command instance. If I have this ctor code in my VM:\r\n\r\n```C#\r\nthis.MyCommand\r\n    .Subscribe(DoSomeOtherThingWhenTheCommandIsExecuted);\r\n```\r\n\r\nAnd I have this in my view:\r\n\r\n```C#\r\nthis.BindCommand(ViewModel, x => x.MyCommand, x => x.someButton);\r\n```\r\n\r\nIt won't work as expected. The binding infrastructure will obtain a different instance than that used in my VM's ctor."}}