mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Readded Growl logo via embedded binary blob.
This commit is contained in:
committed by
Mark McDowall
parent
a62cd042de
commit
d1a8cd2a84
@@ -0,0 +1,28 @@
|
||||
using NzbDrone.Common.EnsureThat;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace NzbDrone.Common
|
||||
{
|
||||
public static class ResourceExtensions
|
||||
{
|
||||
public static Byte[] GetManifestResourceBytes(this Assembly assembly, String name)
|
||||
{
|
||||
var stream = assembly.GetManifestResourceStream(name);
|
||||
|
||||
var result = new Byte[stream.Length];
|
||||
var read = stream.Read(result, 0, result.Length);
|
||||
|
||||
if (read != result.Length)
|
||||
{
|
||||
throw new EndOfStreamException("Reached end of stream before reading enough bytes.");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user