IF.Lastfm/IF.Lastfm.Core/Api/Helpers/LastResponse.cs
Rikki Tooley 03fa6f74e9 Changed error handling, stubbed most of albumapi
Methods now return LastResponse or ListResponse (confusing? hmm) instead
of throwing exceptions.
2013-06-14 13:11:42 +01:00

40 lines
806 B
C#

using IF.Lastfm.Core.Api.Enums;
namespace IF.Lastfm.Core.Api.Helpers
{
public class LastResponse
{
#region Properties
public bool Success { get; set; }
public LastFmApiError Error { get; set; }
#endregion
#region Factory methods
public static LastResponse CreateSuccessResponse()
{
var r = new LastResponse
{
Success = true,
Error = LastFmApiError.None
};
return r;
}
public static LastResponse CreateErrorResponse(LastFmApiError error)
{
var r = new LastResponse
{
Success = false,
Error = error
};
return r;
}
#endregion
}
}