revert some clearly broken commits
This commit is contained in:
@@ -6,9 +6,9 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace GravatarWrapper.Exceptions
|
namespace GravatarWrapper.Exceptions
|
||||||
{
|
{
|
||||||
class NoResponseReturnedException : Exception
|
class NoResponseFoundException : Exception
|
||||||
{
|
{
|
||||||
public NoResponseReturnedException()
|
public NoResponseFoundException()
|
||||||
: base("No response returned from server"){}
|
: base("No response returned from server"){}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ using System.Security.Cryptography;
|
|||||||
using RestSharp;
|
using RestSharp;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using GravatarWrapper;
|
|
||||||
using GravatarWrapper.Exceptions;
|
using GravatarWrapper.Exceptions;
|
||||||
|
|
||||||
namespace GravatarWrapper
|
namespace GravatarWrapper
|
||||||
@@ -41,14 +40,10 @@ namespace GravatarWrapper
|
|||||||
if (res != null)
|
if (res != null)
|
||||||
{
|
{
|
||||||
var imagebytes = res.RawBytes;
|
var imagebytes = res.RawBytes;
|
||||||
//IDisposable implementation
|
var ms = new MemoryStream(imagebytes);
|
||||||
using (var ms = new MemoryStream(imagebytes))
|
|
||||||
{
|
|
||||||
return new Bitmap(ms);
|
return new Bitmap(ms);
|
||||||
}
|
}
|
||||||
|
throw new NoResponseFoundException();
|
||||||
}
|
|
||||||
throw new NoResponseReturnedException();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user