mirror of
https://github.com/Sarsoo/IF.Lastfm.git
synced 2024-10-16 23:13:07 +01:00
Code tidying
- pressed a few buttons in ReSharper
This commit is contained in:
parent
bdec7c9a35
commit
60ea301d1f
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using IF.Lastfm.Core.Api.Helpers;
|
||||
|
||||
@ -29,7 +28,7 @@ public override void SetParameters()
|
||||
Parameters.Add("message", Message);
|
||||
}
|
||||
|
||||
public async override Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
return await LastResponse.HandleResponse(response);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<LastResponse<LastAlbum>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse<LastAlbum>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -35,7 +35,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastShout>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastShout>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -39,7 +39,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -47,7 +47,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -27,7 +27,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastAlbum>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastAlbum>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -23,7 +23,7 @@ public override void SetParameters()
|
||||
Parameters.Add("message", Message);
|
||||
}
|
||||
|
||||
public async override Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
return await LastResponse.HandleResponse(response);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<LastResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -35,7 +35,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -27,7 +27,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastAlbum>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastAlbum>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -27,7 +27,7 @@ public override void SetParameters()
|
||||
Parameters.Add("autocorrect", Convert.ToInt32(Autocorrect).ToString());
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -27,7 +27,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -27,7 +27,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -33,7 +33,7 @@ public override void SetParameters()
|
||||
Parameters.Add("password", Password);
|
||||
}
|
||||
|
||||
public async override Task<LastResponse<LastUserSession>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse<LastUserSession>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -19,7 +19,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -19,7 +19,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -40,7 +40,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -2,10 +2,6 @@
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using IF.Lastfm.Core.Api.Helpers;
|
||||
using IF.Lastfm.Core.Api.Enums;
|
||||
using IF.Lastfm.Core.Objects;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IF.Lastfm.Core.Api.Commands.Library {
|
||||
[ApiMethodName("library.removeScrobble")]
|
||||
@ -28,7 +24,7 @@ public override void SetParameters() {
|
||||
Parameters.Add( "timestamp", Timestamp.AsUnixTime().ToString() );
|
||||
}
|
||||
|
||||
public async override Task<LastResponse> HandleResponse( HttpResponseMessage response ) {
|
||||
public override async Task<LastResponse> HandleResponse( HttpResponseMessage response ) {
|
||||
return await LastResponse.HandleResponse( response );
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public override void SetParameters() {
|
||||
Parameters.Add( "track", Track );
|
||||
}
|
||||
|
||||
public async override Task<LastResponse> HandleResponse( HttpResponseMessage response ) {
|
||||
public override async Task<LastResponse> HandleResponse( HttpResponseMessage response ) {
|
||||
return await LastResponse.HandleResponse( response );
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<LastResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -26,7 +26,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using IF.Lastfm.Core.Api.Enums;
|
||||
using IF.Lastfm.Core.Api.Helpers;
|
||||
@ -29,7 +25,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastAlbum>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastAlbum>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using IF.Lastfm.Core.Api.Enums;
|
||||
using IF.Lastfm.Core.Api.Helpers;
|
||||
@ -12,12 +8,12 @@
|
||||
|
||||
namespace IF.Lastfm.Core.Api.Commands.Tag
|
||||
{
|
||||
[ApiMethodName("tag.getTopTracks")]
|
||||
internal class GetTopTracksCommand: GetAsyncCommandBase<PageResponse<LastTrack>>
|
||||
[ApiMethodName("tag.getTopArtists")]
|
||||
internal class GetTopArtistsCommand : GetAsyncCommandBase<PageResponse<LastArtist>>
|
||||
{
|
||||
public string TagName { get; set; }
|
||||
|
||||
public GetTopTracksCommand(ILastAuth auth, string tagName) : base(auth)
|
||||
public GetTopArtistsCommand(ILastAuth auth, string tagName) : base(auth)
|
||||
{
|
||||
TagName = tagName;
|
||||
}
|
||||
@ -29,7 +25,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
@ -37,14 +33,14 @@ public async override Task<PageResponse<LastTrack>> HandleResponse(HttpResponseM
|
||||
if (LastFm.IsResponseValid(json, out status) && response.IsSuccessStatusCode)
|
||||
{
|
||||
var jtoken = JsonConvert.DeserializeObject<JToken>(json);
|
||||
var resultsToken = jtoken.SelectToken("toptracks");
|
||||
var itemsToken = resultsToken.SelectToken("track");
|
||||
var resultsToken = jtoken.SelectToken("topartists");
|
||||
var itemsToken = resultsToken.SelectToken("artist");
|
||||
|
||||
return PageResponse<LastTrack>.CreateSuccessResponse(itemsToken, resultsToken, LastTrack.ParseJToken, LastPageResultsType.Attr);
|
||||
return PageResponse<LastArtist>.CreateSuccessResponse(itemsToken, resultsToken, LastArtist.ParseJToken, LastPageResultsType.Attr);
|
||||
}
|
||||
else
|
||||
{
|
||||
return LastResponse.CreateErrorResponse<PageResponse<LastTrack>>(status);
|
||||
return LastResponse.CreateErrorResponse<PageResponse<LastArtist>>(status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTag>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using IF.Lastfm.Core.Api.Enums;
|
||||
using IF.Lastfm.Core.Api.Helpers;
|
||||
@ -12,12 +8,12 @@
|
||||
|
||||
namespace IF.Lastfm.Core.Api.Commands.Tag
|
||||
{
|
||||
[ApiMethodName("tag.getTopArtists")]
|
||||
internal class GetTopArtistsCommand: GetAsyncCommandBase<PageResponse<LastArtist>>
|
||||
[ApiMethodName("tag.getTopTracks")]
|
||||
internal class GetTopTracksCommand : GetAsyncCommandBase<PageResponse<LastTrack>>
|
||||
{
|
||||
public string TagName { get; set; }
|
||||
|
||||
public GetTopArtistsCommand(ILastAuth auth, string tagName) : base(auth)
|
||||
public GetTopTracksCommand(ILastAuth auth, string tagName) : base(auth)
|
||||
{
|
||||
TagName = tagName;
|
||||
}
|
||||
@ -29,7 +25,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
@ -37,14 +33,14 @@ public async override Task<PageResponse<LastArtist>> HandleResponse(HttpResponse
|
||||
if (LastFm.IsResponseValid(json, out status) && response.IsSuccessStatusCode)
|
||||
{
|
||||
var jtoken = JsonConvert.DeserializeObject<JToken>(json);
|
||||
var resultsToken = jtoken.SelectToken("topartists");
|
||||
var itemsToken = resultsToken.SelectToken("artist");
|
||||
var resultsToken = jtoken.SelectToken("toptracks");
|
||||
var itemsToken = resultsToken.SelectToken("track");
|
||||
|
||||
return PageResponse<LastArtist>.CreateSuccessResponse(itemsToken, resultsToken, LastArtist.ParseJToken, LastPageResultsType.Attr);
|
||||
return PageResponse<LastTrack>.CreateSuccessResponse(itemsToken, resultsToken, LastTrack.ParseJToken, LastPageResultsType.Attr);
|
||||
}
|
||||
else
|
||||
{
|
||||
return LastResponse.CreateErrorResponse<PageResponse<LastArtist>>(status);
|
||||
return LastResponse.CreateErrorResponse<PageResponse<LastTrack>>(status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public override void SetParameters()
|
||||
Parameters.Add("message", Message);
|
||||
}
|
||||
|
||||
public async override Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
return await LastResponse.HandleResponse(response);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public override void SetParameters()
|
||||
}
|
||||
}
|
||||
|
||||
public async override Task<LastResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -35,7 +35,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastShout>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastShout>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -42,7 +42,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -24,7 +24,7 @@ public override void SetParameters()
|
||||
Parameters.Add("artist", ArtistName);
|
||||
}
|
||||
|
||||
public async override Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
return await LastResponse.HandleResponse(response);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using IF.Lastfm.Core.Api.Enums;
|
||||
@ -51,7 +50,7 @@ public override void SetParameters()
|
||||
}
|
||||
}
|
||||
|
||||
public async override Task<ScrobbleResponse> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<ScrobbleResponse> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -27,7 +27,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -24,7 +24,7 @@ public override void SetParameters()
|
||||
Parameters.Add("artist", ArtistName);
|
||||
}
|
||||
|
||||
public async override Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
return await LastResponse.HandleResponse(response);
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using IF.Lastfm.Core.Api.Enums;
|
||||
using IF.Lastfm.Core.Api.Helpers;
|
||||
using IF.Lastfm.Core.Objects;
|
||||
|
||||
|
@ -24,7 +24,7 @@ public override void SetParameters()
|
||||
Parameters.Add("message", Message);
|
||||
}
|
||||
|
||||
public async override Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
return await LastResponse.HandleResponse(response);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<LastResponse<LastUser>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<LastResponse<LastUser>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -26,7 +26,7 @@ public override void SetParameters()
|
||||
AddPagingParameters();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastStation>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastStation>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
string json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -34,7 +34,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastTrack>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -18,7 +18,7 @@ public override void SetParameters()
|
||||
AddPagingParameters();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -26,7 +26,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastShout>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastShout>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -28,7 +28,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastAlbum>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastAlbum>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -30,7 +30,7 @@ public override void SetParameters()
|
||||
DisableCaching();
|
||||
}
|
||||
|
||||
public async override Task<PageResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
public override async Task<PageResponse<LastArtist>> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
@ -44,7 +44,7 @@ public static LastResponse CreateSuccessResponse()
|
||||
return r;
|
||||
}
|
||||
|
||||
public async static Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
public static async Task<LastResponse> HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using IF.Lastfm.Core.Api.Helpers;
|
||||
using IF.Lastfm.Core.Objects;
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using IF.Lastfm.Core.Api.Helpers;
|
||||
using IF.Lastfm.Core.Objects;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using IF.Lastfm.Core.Api.Enums;
|
||||
using IF.Lastfm.Core.Api.Helpers;
|
||||
using IF.Lastfm.Core.Objects;
|
||||
|
||||
|
@ -24,7 +24,7 @@ public void Enqueue(HttpResponseMessage message)
|
||||
_queuedResponses.Enqueue(message);
|
||||
}
|
||||
|
||||
protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
|
||||
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
|
||||
{
|
||||
Sent.Add(Tuple.Create(request, await request.Content.ReadAsStringAsync()));
|
||||
var response = _queuedResponses.Dequeue()
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace IF.Lastfm.Core.Json
|
||||
{
|
||||
|
@ -7,7 +7,6 @@
|
||||
using System.Net.Http;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using IF.Lastfm.Core.Api.Commands;
|
||||
|
||||
[assembly: InternalsVisibleTo("IF.Lastfm.Core.Tests")]
|
||||
[assembly: InternalsVisibleTo("IF.Lastfm.Core.Tests.Integration")]
|
||||
|
@ -1,7 +1,5 @@
|
||||
using System.Resources;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
|
Loading…
Reference in New Issue
Block a user