revert some clearly broken commits

This commit is contained in:
Tommy Parnell
2014-01-26 05:38:45 -05:00
parent 070c8d4605
commit 69b7f2013b
2 changed files with 5 additions and 10 deletions

View File

@@ -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"){}
} }
} }

View File

@@ -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();
} }
} }
} }