title: How to call AsyncRelayCommand
body: <p>I have a WPF MVVM application, created with VS2015.</p>
  
  <p>I have been using a "RelayCommand" class to wire up command calls from the xaml to the view model. This has worked well but now I have a button click that triggers a process that takes a long time. I'd like to make this Async so that the UI remains responsive.</p>
  
  <p>I've updated my view model method to make it, and all downstream calls async. This is now working well from my unit test, which I also updated to make the async reequest.</p>
  
  <p>I found an AsyncRelayCommand class which implements ICommand and has the following constructor:</p>
  
  <pre><code>public AsyncRelayCommand(Func&lt;object, Task&gt; execute, Func&lt;object, bool&gt; canExecute = null)
      {
          this.execute = execute;
          this.canExecute = canExecute ?? (o =&gt; true);
      }
  </code></pre>
  
  <p>My problem is, I don't know how to create an instance of the AsyncRelayCommand. I have tried the following:</p>
  
  <pre><code>CompareCommand = new AsyncRelayCommand(Task.Run(() =&gt; OnCompareAsync));
  </code></pre>
  
  <p>This gives the red sqiggly under the "OnCompareAsync" with 3 errors, including:</p>
  
  <blockquote>
    <p>Cannot convert method group 'OnCompareAsync' to non-delegate type 'Task'. Did you intend to invoke the method?</p>
  </blockquote>
  
  <p>How do I use this constructor?</p>