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