Skip to content

Commit

Permalink
Fixing syro after httpclient changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rikkit committed Apr 29, 2015
1 parent 57092d7 commit b28c3c1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/IF.Lastfm.Syro/Helpers/DummyPostAsyncCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System.IO;
using System;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using IF.Lastfm.Core;
using IF.Lastfm.Core.Api;
using IF.Lastfm.Core.Api.Commands;
using IF.Lastfm.Core.Api.Helpers;
Expand All @@ -16,6 +18,11 @@ public DummyPostAsyncCommand(ILastAuth auth) : base(auth)
{
}

protected override Uri BuildRequestUrl()
{
return new Uri(LastFm.ApiRootSsl, UriKind.Absolute);
}

public override void SetParameters()
{
AddPagingParameters();
Expand Down
4 changes: 4 additions & 0 deletions src/IF.Lastfm.Syro/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows;
Expand Down Expand Up @@ -271,6 +272,9 @@ private async Task ExecuteSelectedCommand()
countProperty.SetValue(instance, int.Parse(_state.CommandItemCount));
}

var httpClientProperty = genericType.GetProperty("HttpClient", BindingFlags.Public | BindingFlags.Instance);
httpClientProperty.SetValue(instance, new HttpClient());

var parametersProperty = genericType.GetProperty("Parameters",
BindingFlags.Public | BindingFlags.Instance);
parametersProperty.SetValue(instance, parameters);
Expand Down

0 comments on commit b28c3c1

Please sign in to comment.