2012-07-14 20:45:11 +00:00
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Reflection;
|
2012-07-20 02:22:44 +00:00
|
|
|
|
using MediaBrowser.Net;
|
|
|
|
|
using MediaBrowser.Net.Handlers;
|
2012-07-14 20:45:11 +00:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.HtmlBrowser.Handlers
|
|
|
|
|
{
|
|
|
|
|
class EmbeddedResourceHandler : BaseEmbeddedResourceHandler
|
|
|
|
|
{
|
2012-07-20 02:22:44 +00:00
|
|
|
|
public EmbeddedResourceHandler(string resourcePath)
|
|
|
|
|
: base(resourcePath)
|
2012-07-14 20:45:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override Stream GetEmbeddedResourceStream()
|
|
|
|
|
{
|
|
|
|
|
string path = ResourcePath.Replace("/", ".");
|
|
|
|
|
|
|
|
|
|
return Assembly.GetExecutingAssembly().GetManifestResourceStream("MediaBrowser.HtmlBrowser.Html." + path);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|